Edges And Corners

This palette contains functions for edges, corners and line finding, eigenvalue and distance calculation.

Note: A vi icon with yellow background means they work on color images. With gray background means they only work on single channel image. With half yellow and half gray background means they work on both color and single channel image. Others vi icon background are for either examples or high level vis. For controls descriptions, you need to go to the vi in LabVIEW, use help (ctrl+H) and move mouse over the controls to see them.


IVision_Canny_Gray.vi

Finds the edges on the input image and marks them in the image out using the Canny algorithm. The smallest of LowThreshold and HighThreshold is used for edge linking, the largest - to find initial segments of strong edges.

Connector Pane

IVision_Canny_Gray.vi


IVision_GoodFeaturesToTrack_Gray.vi

The function finds corners with big eigenvalues in the image.

Connector Pane

IVision_GoodFeaturesToTrack_Gray.vi


IVision_HoughLines.vi

Find lines using Hough transform. Work on single channel (binary) image. Source image may be modified by this vi.

Connector Pane

IVision_HoughLines.vi


IVision_DistanceTransform.vi

The function calculates the approximated distance from every binary image pixel to the nearest zero pixel. For zero pixels the function sets the zero distance, for others it finds the shortest path consisting of basic shifts: horizontal, vertical, diagonal or knight's move (the latest is available for 5×5 mask). The overal distance is calculated as a sum of these basic distances. Because the distance function should be symmetric, all the horizontal and vertical shifts must have the same cost (that is denoted as a), all the diagonal shifts must have the same cost (denoted b), and all knight's moves' must have the same cost (denoted c). For CV_DIST_C and CV_DIST_L1 types the distance is calculated precisely, whereas for CV_DIST_L2 (Euclidian distance) the distance can be calculated only with some relative error (5×5 mask gives more accurate results), OpenCV uses the values suggested in [Borgefors86]:

CV_DIST_C (3×3):

a=1, b=1

CV_DIST_L1 (3×3):

a=1, b=2

CV_DIST_L2 (3×3):

a=0.955, b=1.3693

CV_DIST_L2 (5×5):

a=1, b=1.4, c=2.1969

Typically, for fast coarse distance estimation CV_DIST_L2, 3×3 mask is used, and for more accurate distance estimation CV_DIST_L2, 5×5 mask is used.

Connector Pane

IVision_DistanceTransform.vi


IVision_Laplace_Gray.vi

Calculates Laplacian of the source image by summing second x- and y- derivatives calcualted using Sobel operator.

Specifying apertureSize=1 gives the fastest variant that is equal to convolving the image with the following kernel:

|0 1 0|

|1 -4 1|

|0 1 0|

As well as in Sobel function, no scaling is done and the same combinations of input and output formats are supported.

Connector Pane

IVision_Laplace_Gray.vi


IVision_PreCornerDetect.vi

The function finds the corners on the input image and stores them in the corners image.

Connector Pane

IVision_PreCornerDetect.vi


IVision_Sobel_Gray.vi

The Sobel operators combine Gaussian smoothing and differentiation so the result is more or less robust to the noise. Most often, the function is called with (dx=1, dy=0, apertureSize=3) or (dx=0, dy=1, apertureSize=3) to calculate first x- or y- image derivative. The first case corresponds to

|-1 0 1|

|-2 0 2|

|-1 0 1|

kernel and the second one corresponds to

|-1 -2 -1|

| 0 0 0|

| 1 2 1|

or

| 1 2 1|

| 0 0 0|

|-1 -2 -1|

kernel, depending on the image origin (origin field of IplImage structure). No scaling is done, so the destination image usually has larger by absolute value numbers than the source image. To avoid overflow, the function requires 16-bit destination image if the source image is 8-bit. The result can be converted back to 8-bit using IVision_ConvertScale.vi or IVision_ConvertScaleAbs.vi functions. Besides 8-bit images the function can process 32-bit floating-point images. Both source and destination must be single-channel images of equal size or ROI size.

Connector Pane

IVision_Sobel_Gray.vi


IVision_CornerEigenValueVecs.vi

Corner image to store the results must be 6 times wider than the input image.

Connector Pane

IVision_CornerEigenValueVecs.vi


IVision_CornerMinEigenValue.vi

Calculates minimal eigenvalue of image blocks for corner detection

The function is similar to IVision_CornerEigenValsVecs.vi but it calculates and stores only the minimal eigen value of derivative covariation matrix for every pixel.

Connector Pane

IVision_CornerMinEigenValue.vi