Click or drag to resize

FoundLine Class

This class holds the data of a line segment found by image processing. The line segment is defined by two points P1 and P2. All other data is derived from them. Geometry and names:
 y ^
   |
  \|
a -\
   |\
   | \
   |  \
   |   \ P1    dx
   |    *-------------+ 
   |     \            |
   |      \           |
   |       \          | 
   |  Phi  /\         |
   |______/  \        |
   |          \  _____| dy
   |           \/     |
   |            \ Phi |
   |             \    |
   |              \   |
   |               \  |
   |                \ |
   |                 \|
   |                  * P2
   |                   \
   |                    \
   |                     \     
   |                      \      
   |                    ---\   
   |                  / 90° * PlumbPoint   
   |                  \.     \
   |           R  .           \
   |         .     \           \______
   |    .     Phi   |           \Alpha\
---+-----------------------------\------------------->
   |                             |\                  x
   |                             b \
   |                                \
   |
The Hessian normal form defines a line by the perpendicular distance R from the origin to the line (the point that we call PlumbPoint here) and the angle Phi between the x axis and the line from the origin to the PlumbPoint.
Inheritance Hierarchy
SystemObject
  RAYLASE.Marker.JobElement.ImageProcessingBaseFoundImageProcessingObject
    RAYLASE.Marker.JobElement.ImageProcessingFoundLine
      RAYLASE.Marker.JobElement.ImageProcessingFoundTransition

Namespace: RAYLASE.Marker.JobElement.ImageProcessing
Assembly: RAYLASE.Marker.JobElement (in RAYLASE.Marker.JobElement.dll) Version: 2.20.0
Syntax
C#
public class FoundLine : BaseFoundImageProcessingObject, IFoundObject

The FoundLine type exposes the following members.

Constructors
 NameDescription
Public methodFoundLine(FoundLine) Copy constructor.
Public methodFoundLine(dvec2, dvec2, dvec3) Constructs a line using two dvec2 points.
Public methodFoundLine(dvec3, dvec3, dvec3) Constructs a line using two dvec3 points.
Public methodFoundLine(dvec3, Double, dvec3) Constructs a line using a dvec3 point and an angle.
Public methodFoundLine(Point, Double, dvec3) Constructs a line using a System.Drawing.Point and an angle.
Public methodFoundLine(Point, Point, dvec3) Constructs a line using two points of type System.Drawing.Point.
Public methodFoundLine(PointF, PointF, dvec3) Constructs a line using two points of type System.Drawing.PointF.
Top
Properties
 NameDescription
Public propertyAngle The angle between the x axis and the line in rad, measured counter clockwise, in the range [-pi,+pi]. (Same as "Alpha" in the sketch above.)
(Overrides BaseFoundImageProcessingObjectAngle)
Public propertyArea The area enclosed of the object's contour.
(Inherited from BaseFoundImageProcessingObject)
Public propertyCenter The center (midpoint) of the line.
(Overrides BaseFoundImageProcessingObjectCenter)
Public propertyDistanceToOrigin
(Overrides BaseFoundImageProcessingObjectDistanceToOrigin)
Public propertyDistanceToRoiCenter The distance between the found object's center and the center of the region of interest in which the object has been found.
(Inherited from BaseFoundImageProcessingObject)
Public propertyFilterFields Only for the GUI: This array controls which properties in the result output will have a funnel for transferring a value range around the current value into the filter/selection group. If empty, all relevant properties will have a funnel.
Public propertyImageIndex The image processing plug-in has a ring buffer array of images where the result of an object finding process is stored. This index is stored here.
(Inherited from BaseFoundImageProcessingObject)
Public propertyLength The length of the line.
(Overrides BaseFoundImageProcessingObjectLength)
Public propertyObjectColor The color a found object will have when drawn in a result image.
(Inherited from BaseFoundImageProcessingObject)
Public propertyObjectFields The list of the relevant parameters and their values in the result output.
Public propertyObjectText The list of parameters and their values as string for showing in the GUI.
Public propertyObjectTypeTitle The title of an object entry in the list of results.
Public propertyObjectUnit The unit the found object's coordinate are in. Pixel or millimeter.
(Inherited from BaseFoundImageProcessingObject)
Public propertyP1 The first point of the line.
Public propertyP2 The second point of the line.
Public propertyPhi The angle between the normal of the line and the x axis as used in the Hessian normal form.
Public propertyPlumbPoint This is the point with the shortest distance between the line and the origin.
Public propertyPoint1 The first point of the line as type System.Drawing.Point.
Public propertyPoint2 The second point of the line as type System.Drawing.Point.
Public propertyR The distance R between the origin and the line as used in the Hessian normal form.
Public propertyRoiCenter The center of the region of interest in which the object has been found in micrometers in world coordinates in the workspace's coordinate system.
(Inherited from BaseFoundImageProcessingObject)
Public propertySearchNo The sequential number of the search which is done during the image processing job. I. e. an identifier for the 1st, 2nd or 3rd search an object has been found in; the value is 1, 2 or 3.
(Inherited from BaseFoundImageProcessingObject)
Public propertySize The size of the (possibly rotated) bounding box around the object.
(Inherited from BaseFoundImageProcessingObject)
Protected propertyUnitFactor Unit factor to convert micrometers into millimeters in case the unit is not pixel.
(Inherited from BaseFoundImageProcessingObject)
Top
Methods
 NameDescription
Public methodAngleBetween Retrieves the angle, expressed in degrees, between the two specified lines.
Public methodCalcDistance(dvec3) Calculates the distance between this line and the given point p.
Public methodCalcDistance(PointF) Calculates the distance between this line and the given point p.
Public methodCalcDistance(FoundLine, Boolean, dvec3) Distance between two lines: The distance between two parallel lines 1 and 2 is just the difference R2-R1. This calculation turned out to be instable in case the angles of the lines differ too much. Too much can mean rather small angles if R is big. Therefore another distance definition is used if the flag isMidpointBased is true: This line is the base line which defines the Angle. The given "other" line in the argument is the line we want the distance to know with its start and end points P1 and P2. For the "other line" the mid point M is calculated, and its distance D to the plumb point will be returned as the distance between the lines.
Public methodCalcIntersectionPoint(FoundLine, PointF) Calculates the intersection point of this line with the given line.
Public methodCalcIntersectionPoint(FoundLine, Nullabledvec3, Double) Calculates the intersection point of this line with the given line.
Public methodCloneDeep Creates a deep clone of this object.
(Overrides BaseFoundImageProcessingObjectCloneDeep)
Public methodGetBorderPoints Calculates to this line the intersection points P1 and P2 with the given quadrangle.
               / Line
              /
          P1 /
+-----------+---------+ 
 \         /          |
  \       /           |
   \     /   Quad-    |
    \   /             +
     \ /    rangle   /
   P2 +             /
     / \           /
    /   \         /
   /     \       /
  /       \     /
           \   /
            \ /
             +
Public methodIsCenterEqual Checks if this object has the same center as the other object.
(Inherited from BaseFoundImageProcessingObject)
Public methodLinearFunction Calculates the gradient and y-intercept of the straight line.
Protected methodSetFilter Only for the GUI: Sets a funnel button in front of the displayed property in the result list when the property name is contained in the given string array. The button transfers a value range around the property value into the according value range fields in the dialog.
(Inherited from BaseFoundImageProcessingObject)
Public methodToString Returns the list of all relevant properties as combined string.
(Inherited from BaseFoundImageProcessingObject)
Public methodVector Returns from the two points P1 and P2 of the line the vector P1-P2.
Top
Fields
 NameDescription
Protected field_angle The angle, measured counter clockwise, between the object (in case of a line) or its bounding box and the x axis.
(Inherited from BaseFoundImageProcessingObject)
Protected field_area The area enclosed by the object's contour.
(Inherited from BaseFoundImageProcessingObject)
Protected field_center The center point of the object.
(Inherited from BaseFoundImageProcessingObject)
Protected field_length The length or circumference of the object's contour.
(Inherited from BaseFoundImageProcessingObject)
Top
See Also