CVB.Net 15.0
EdgeDetectionResult Struct Reference

Result of the function DetectEdgesOfStripeTarget. More...

Public Member Functions

 EdgeDetectionResult (int[] scanLineIndices, double[] edgeIndices, int numProfiles, int numEdgesPerProfile)
 Creates new EdgeDetectionResult. More...
 

Properties

int[] ScanLineIndices [get]
 Array that holds the indices of the scan lines. More...
 
double[] EdgeIndices [get]
 Array that holds the indices of the edges for each scan line. More...
 
int NumProfiles [get]
 Number of scan lines where edges are correctly detected. More...
 
int NumEdgesPerProfile [get]
 Number of edges per scan line.
 

Detailed Description

Result of the function DetectEdgesOfStripeTarget.

The CalibrationLineScan.DetectEdgesOfStripeTarget function identifies edges within an image depicting a target with alternating black and white stripes.The image is scanned line by line and the results, including edge indices and scan lines are stored within this class.

Subsequently, the instance of this class serves as input for the linescan calibration process executed by the CalibrationLineScan.CreateLineScanCalibration function.

Constructor & Destructor Documentation

◆ EdgeDetectionResult()

EdgeDetectionResult ( int[]  scanLineIndices,
double[]  edgeIndices,
int  numProfiles,
int  numEdgesPerProfile 
)

Creates new EdgeDetectionResult.

Parameters
scanLineIndicesArray that holds the indices of the scan lines
edgeIndicesArray that holds the indices of the edges for each scan line
numProfilesNumber of scan lines where edges are correctly detected>
numEdgesPerProfileNumber of edges per scan line

Property Documentation

◆ EdgeIndices

double [] EdgeIndices
get

Array that holds the indices of the edges for each scan line.

Note, that the size of the returned vector does not represent the actual dimensions. The size depends on the allocated memory determined by the image height and the given number of stripes given in function CalibrationLineScan.DetectEdgesOfStripeTarget. The edge indices are stored subsequently scan line by scan line. Only values up to elements with index NumEdgesPerProfile*NumProfiles-1 are valid.

The following code snippet prints ScanLineIndices and EdgeIndices in a more readable format:

detectedEdges = ...
var scanlines = detectedEdges.ScanLineIndices;
var edges = detectedEdges.EdgeIndices;
var idx = 0;
for (int i = 0; i<detectedEdges.NumProfiles; i++)
{
Console.Write("scan line " + scanlines[i] + " with edges at: ");
for (int j = 0; j<detectedEdges.NumEdgesPerProfile; j++)
{
Console.Write(edges[idx++] + " ");
}
Console.Write("\n");
}
Console.Write("\n");

◆ NumProfiles

int NumProfiles
get

Number of scan lines where edges are correctly detected.

Note, that only profiles, where the same number of edges are found, are stored to EdgeDetectionResult.

◆ ScanLineIndices

int [] ScanLineIndices
get

Array that holds the indices of the scan lines.

Note, that the size of the returned vector does not represent the actual number of indices. The size depends on the allocated memory determined by the image height given in function CalibrationLineScan.DetectEdgesOfStripeTarget. Only values up to elements with index NumProfiles-1 are valid.