System MarshalByRefObject
Cognex.VisionPro.Implementation CogObjectBase
Cognex.VisionPro.Implementation CogSerializableObjectBase
Cognex.VisionPro.Implementation CogSerializableChangedEventBase
Cognex.VisionPro.LineMax CogLineMax
Namespace: Cognex.VisionPro.LineMax
Assembly: Cognex.VisionPro.LineMax (in Cognex.VisionPro.LineMax.dll) Version: 80.0.0.0
The CogLineMax type exposes the following members.
| Name | Description | |
|---|---|---|
| CogLineMax |
Constructs a new instance of this class.
| |
| CogLineMax(CogLineMax) |
Constructs a deep copy of the supplied instance.
| |
| CogLineMax(SerializationInfo, StreamingContext) |
Serialization constructor.
|
| Name | Description | |
|---|---|---|
| CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) | |
| Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
| Execute(ICogImage, ICogRegion) |
Performs line finding on the supplied image. The inspection results are
stored in a
CogLineMaxResults
object.
| |
| Execute(IEnumerable ICogImage , IEnumerable ICogRegion ) |
Performs line finding on the supplied images. The inspection results are
stored in a
CogLineMaxResults
object.
| |
| Execute(ICogImage, ICogRegion, CogImage8Grey, Int32, Int32) |
Performs line finding on the supplied image. The inspection results are
stored in a
CogLineMaxResults
object.
| |
| Execute(IEnumerable ICogImage , IEnumerable ICogRegion , IEnumerable CogImage8Grey , IEnumerable Int32 , IEnumerable Int32 ) |
Performs line finding on the supplied images. The inspection results are
stored in a
CogLineMaxResults
object.
| |
| Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
| GetAttributes |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetClassName |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetComponentName |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetConverter |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetDefaultEvent |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetDefaultProperty |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEditor |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEvents |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEvents( Attribute ) |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
| GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
| GetObjectData |
Implements the GetObjectData method of the ISerializable interface.
(Inherited from CogSerializableObjectBase.) | |
| GetProperties |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetProperties( Attribute ) |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetPropertyOwner |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.) | |
| OnChanged(Int64) |
This method should be called internally whenever the object's state may
have changed.
(Inherited from CogSerializableChangedEventBase.) | |
| OnChanged(CogChangedEventArgs) |
This method may be called internally whenever a derived object's state
may have changed and the derived object expresses this change via a
derived CogChangedEventArgs class.
(Inherited from CogSerializableChangedEventBase.) | |
| ResumeAndRaiseChangedEvent |
Re-enables raising of the Changed event after SuspendChangedEvent
has been called, and raises the Changed event if the
ChangedEventSuspended count is reduced to zero and any changes were
made while events were suspended. Must be called once for each call to
SuspendChangedEvent.
(Inherited from CogSerializableChangedEventBase.) | |
| SuspendChangedEvent |
Temporarily suspends the raising of the Changed event. May be called
more than once, and a corresponding call to ResumeAndRaiseChangedEvent
must be made for each call to SuspendChangedEvent.
(Inherited from CogSerializableChangedEventBase.) | |
| ToString | Returns a String that represents the current Object. (Inherited from Object.) |
| Name | Description | |
|---|---|---|
| SfAssurance |
This bit will be set in the EventArgs of a Changed event every
time the value returned by
Assurance
may have changed.
| |
| SfCoverageThreshold |
This bit will be set in the EventArgs of a Changed event every
time the value returned by
CoverageThreshold
may have changed.
| |
| SfDistanceTolerance |
This bit will be set in the EventArgs of a Changed event every
time the value returned by
DistanceTolerance
may have changed.
| |
| SfEdgeAngleTolerance |
This bit will be set in the EventArgs of a Changed event every
time the value returned by
EdgeAngleTolerance
may have changed.
| |
| SfEdgeDetectionParams |
This bit will be set in the EventArgs of a Changed event every
time the value returned by
EdgeDetectionParams
may have changed.
| |
| SfExpectedLineNormal |
This bit will be set in the EventArgs of a Changed event every
time the value returned by
ExpectedLineNormal
may have changed.
| |
| SfFittingMode |
This bit will be set in the EventArgs of a Changed event every
time the value returned by
FittingMode
may have changed.
| |
| SfLengthThreshold |
This bit will be set in the EventArgs of a Changed event every
time the value returned by
LengthThreshold
may have changed.
| |
| SfLineAngleTolerance |
This bit will be set in the EventArgs of a Changed event every
time the value returned by
LineAngleTolerance
may have changed.
| |
| SfMaxNumLines |
This bit will be set in the EventArgs of a Changed event every
time the value returned by
MaxNumLines
may have changed.
| |
| SfNextSf |
Next state flag to be used in derived classes.
| |
| SfPolarity |
This bit will be set in the EventArgs of a Changed event every
time the value returned by
Polarity
may have changed.
| |
| SfRegionMode |
This bit will be set in the EventArgs of a Changed event every
time the value returned by
RegionMode
may have changed.
| |
| SfTimeout |
This bit will be set in the EventArgs of a Changed event every
time the value returned by
Timeout
may have changed.
| |
| SfTimeoutEnabled |
This bit will be set in the EventArgs of a Changed event every
time the value returned by
TimeoutEnabled
may have changed.
|
| Name | Description | |
|---|---|---|
| Assurance |
Gets or sets the tradeoff between speed and reliability when
FittingMode is set
to RANSAC
mode.
| |
| ChangedEventSuspended |
If nonzero, indicates that the raising of the Changed event has been
suspended. This value is incremented when SuspendChangedEvent is called
and decremented when ResumeAndRaiseChangedEvent is called.
(Inherited from CogSerializableChangedEventBase.) | |
| CoverageThreshold |
Gets or sets the minimum acceptable proportion of inliers relative to
the number of intersected projection regions. Line segments must meet
this constraint to become results.
| |
| DistanceTolerance |
Gets or sets the maximum allowable distance between a line and an inlier
of the line. Edge points must meet this constraint to become inliers of
the line.
| |
| EdgeAngleTolerance |
Gets or sets the maximum allowable angle between a line and an inlier of
the line. Edge points must meet this constraint to become inliers of the
line.
| |
| EdgeDetectionParams |
Gets or sets the parameters for generating edge points from image data.
| |
| ExpectedLineNormal |
Gets or sets the expected line orientation.
| |
| FittingMode |
Gets or sets the method to use when generating candidate lines. If you
select Exhaustive
mode, a candidate line will be generated for every possible pair of edge
points. If you select RANSAC
mode, a candidate line will be generated from a smaller number of
randomly chosen point pairs.
| |
| HasChanged | (Inherited from CogSerializableChangedEventBase.) | |
| LengthThreshold |
Gets or sets the minimum acceptable length of a line segment. Line
segments must meet this constraint to become results.
| |
| LineAngleTolerance |
Gets or sets the maximum allowable angle between the normal of a
line and the
ExpectedLineNormal
value. Lines must meet this constraint to become results.
| |
| MaxNumLines |
Gets or sets the maximum number of lines to be found. A LineMaxMulti
license must be available to execute the tool with MaxNumLines set
to greater than or equal to 0.
| |
| Polarity |
Gets or sets the polarity constraint. Edge points must meet this
constraint to become inliers.
| |
| RegionMode |
Gets or sets the technique,
PixelAlignedBoundingBoxAdjustMask
or
PixelAlignedBoundingBox,
used to apply the region to the inspection image.
| |
| StateFlags |
Returns the complete set of state flags supported on this object. The
flags may be indexed by name as shown in the following C# code snippet:
if (changedObject.StateFlags["Color"] & eventArgs.StateFlags) { ... }
(Inherited from CogSerializableChangedEventBase.) | |
| Timeout |
Gets or sets the maximum amount of time that the inspection is allowed to
execute.
| |
| TimeoutEnabled |
Get or set the applicability of Timeout.
|
| Name | Description | |
|---|---|---|
| Changed |
This event is raised when one or more parts of the object's state may
have changed.
(Inherited from CogSerializableChangedEventBase.) |
Line finding is accomplished in two phases. The first phase, edge detection, finds edge points within the image(s). The second phase, line fitting, creates lines from roughly collinear subsets of the found edge points.
The first phase, edge detection, finds edge points within the image(s) using parameters defined in the CogLineMaxEdgeDetectionParams class. First, the input image is smoothed and decimated, using GradientKernelSizeInPixels. Gradient vectors are then computed for each pixel in the decimated image. Both the gradient vectors and the input image are projected over many caliper-like projection regions, using ProjectionLengthInPixels. A pixel is considered a candidate edge point if its projected gradient magnitude exceeds ContrastThreshold and if the ratio of its projected gradient magnitude and its intensity exceeds NormalizedContrastThreshold.
Only edge points with gradient directions sufficiently consistent with ExpectedLineNormal can possibly constitute the expected lines at the angle ExpectedLineNormal (where the gradient direction consistency is determined by LineAngleTolerance and EdgeAngleTolerance). Therefore, only such edge points are included in the line fitting phase. Edge points with inconsistent gradient directions are excluded from the line fitting phase and placed into the UnconsideredOutliers collection.
The second phase, line fitting, creates lines from roughly collinear subsets of the found edge points, using parameters defined in the CogLineMax class. Lines are evaluated using a RANSAC or an Exhaustive point selection methodology, depending on the FittingMode setting. Under RANSAC mode, the user may adjust Assurance to fit the desired result optimality and operation speed.
Line fitting is performed by iteratively evaluating candidate lines created from the found edge points. During each iteration two points are randomly selected from the found edge points, a candidate line is modeled from the selected points, and the candidate line inliers are determined.
An edge point is assigned to the inlier list of a candidate line only if it is in the proximity of the candidate line (determined by DistanceTolerance) and if its gradient direction is consistent with the angle of the candidate line (determined by EdgeAngleTolerance). Each edge point can only be assigned to the inlier list of a single line and each line is only allowed to contain at most one edge point from each projection region.
When the RANSAC iterations reach the maximum, the inliers of the best found line candidate will be identified. Then the found line will be refined using a least squares regression fit to the inliers, and the set of inliers will be re-evaluated using the refined line. The refinement will be repeated a maximum of three times until the number of inliers ceases to further increase.
Any edge points that are not inliers of the found line are placed into the ConsideredOutliers collection.