Click or drag to resize

FoundTransition Class

This class holds the data of a transition found by image processing. Strictly speaking a transition is a point where a gray value matches a threshold on a scan line in a region of interest. The scan line should be perpendicular to an edge that is the goal to be find. The transition line is defined as the perpendicular line to the scan line that goes through the transition point TP. The intersection points of the transition line with the region of interest will be calculated; these points are P1 and P2. Using this line between P1 and P2 allows us to reuse the line detection algorithms for the transition calculations to some extent. Therefore this class is derived from FoundLine.
                                             SlStartP
+---------------------------------------------o----------------------------+
| Region of interest                         /                             |
|                                           /                              |
|                                          /                               |
|                                         /                                |
|                             Base point o-------------                    |
|                                       /angle|                            |
|                                      /_____/                             |
|                                     /                                    |
|                                    / Scan line                           |
|                                   /                                      |
o P1                              |/_ Scan direction                       |
|     o                           /                                        |
|           o                    /_                                        |
|            #####o             /   \                                      |
|           ############o   TP /  .  |                                     |
|          ###################o     /                                      |
|         ###################/######o                                      |
|        ##### Object ######/#############o                                |
|       ###################/####################o      Transition line     |
|      ###################/##### to find #############o                    |
|     ###################/###########################       o              |
|    ###################/###########################              o        |
+----------------------o------------------------------------------------o--+
                   SlEndP                                               P2
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.19.0
Syntax
C#
public class FoundTransition : FoundLine, 
	IFoundObject

The FoundTransition type exposes the following members.

Constructors
 NameDescription
Public methodFoundTransition(FoundTransition) Copy constructor.
Public methodFoundTransition(dvec3, Double, dvec3) Constructs a transition based on the given point and an angle.
Public methodFoundTransition(Point, Point, dvec3) Constructs the transition with the given points, sets z value to 0.
Public methodFoundTransition(dvec2, dvec2, dvec2, dvec3) Constructs a transition based on the given two end points and the transition point.
Public methodFoundTransition(dvec3, dvec3, dvec3, Int32) Constructs the transition. Its point will be by default in the middle of the two given points
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.)
(Inherited from FoundLine)
Public propertyArea The area enclosed of the object's contour.
(Inherited from BaseFoundImageProcessingObject)
Public propertyAveGrayValue The average gray value on the whole scan line.
Public propertyCenter The center (midpoint) of the line.
(Inherited from FoundLine)
Public propertyDistanceToOrigin
(Inherited from FoundLine)
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.
(Inherited from FoundLine)
Public propertyGrayValue The gray value of the transition point.
Public propertyGrayValueRange The gray value range (MaxGrayValue-MinGrayValue) on the whole scan line.
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.
(Inherited from FoundLine)
Public propertyMaxGrayValue The maximal gray value on the whole scan line.
Public propertyMinGrayValue The minimal gray value on the whole scan line.
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.
(Inherited from FoundLine)
Public propertyObjectText The list of parameters and their values as string for showing in the GUI.
(Inherited from FoundLine)
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.
(Inherited from FoundLine)
Public propertyP2 The second point of the line.
(Inherited from FoundLine)
Public propertyPhi The angle between the normal of the line and the x axis as used in the Hessian normal form.
(Inherited from FoundLine)
Public propertyPlumbPoint This is the point with the shortest distance between the line and the origin.
(Inherited from FoundLine)
Public propertyPoint1 The first point of the line as type System.Drawing.Point.
(Inherited from FoundLine)
Public propertyPoint2 The second point of the line as type System.Drawing.Point.
(Inherited from FoundLine)
Public propertyR The distance R between the origin and the line as used in the Hessian normal form.
(Inherited from FoundLine)
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 propertyScanPosition The position of the scan line in x direction as percentage of the distance between P1 and P2 in the range of 0..100.
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)
Public propertyTransitionPoint The point where the scan line intersects with the found object. I. e. where the gray value along the scan line meets the defined condition.
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.
(Inherited from FoundLine)
Public methodCalcDistance(dvec3) Calculates the distance between this line and the given point p.
(Inherited from FoundLine)
Public methodCalcDistance(PointF) Calculates the distance between this line and the given point p.
(Inherited from FoundLine)
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.
(Inherited from FoundLine)
Public methodCalcIntersectionPoint(FoundLine, PointF) Calculates the intersection point of this line with the given line.
(Inherited from FoundLine)
Public methodCalcIntersectionPoint(FoundLine, Nullabledvec3, Double) Calculates the intersection point of this line with the given line.
(Inherited from FoundLine)
Public methodCloneDeep
(Overrides FoundLineCloneDeep)
Public methodGetBorderPoints Calculates to this line the intersection points P1 and P2 with the given quadrangle.
               / Line
              /
          P1 /
+-----------+---------+ 
 \         /          |
  \       /           |
   \     /   Quad-    |
    \   /             +
     \ /    rangle   /
   P2 +             /
     / \           /
    /   \         /
   /     \       /
  /       \     /
           \   /
            \ /
             +

(Inherited from FoundLine)
Public methodGetTransitionPointCross(Double, dvec2, dvec2, dvec2, dvec2) The same as the overload, but returning dvec2 points but Points.
Public methodGetTransitionPointCross(Double, Point, Point, Point, Point) Calculates four points p1, p2, p3, p4 around the transition point in distance size forming a cross along the transition line defined by P1 and P2.
P1                    /                                         
o                    + p3                                       
      o      p1     /                                           
            +      /                                            
                  oTP    p2           o                         
                 /      +      P2    /                          
                /             o     /                           
               + p4                / size                       
              /                   /                             
                                 /
                                o
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.
(Inherited from FoundLine)
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.
(Inherited from FoundLine)
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