point_in_line ( Image : : Background, Threshold, Row, Col, LocalDistance, Significance : Exist, BeginRow, BeginCol, EndRow, EndCol )

Check whether a pixel belongs to a line.

The operator point_in_line checks whether the indicated pixel (Row,Col) lies on a straight line in the gray scale image (Image) and, if necessary, returns the existence of the line (Exist = 1) and the maximum straight part of a line with a starting (BeginRow,BeginCol) and an ending point (EndRow,EndCol). The brightness of the background is given by Background. Threshold determines the boundary of the gray value between foreground and background. LocalDistance is a rectangle which defines a region around the pixel. For this rectangle surrounding the pixel a Hough transformation is performed in order to find out whether the pixel is on the line. Then this line is detected within the image. The difference of the local maximum value in the Hough image to the mean value can be determined by Significance.


Parameters

Image (input_object)
image(-array) -> object : byte
Input image.

Background (input_control)
string -> string
Brightness of background.
Default value: 'dark'
List of values: 'dark', 'light'

Threshold (input_control)
integer -> integer
Threshold value.
Default value: 110
Suggested values: 10, 30, 50, 70, 90, 110, 130, 150, 170, 190, 210, 230, 250
Range of values: 1 <= Threshold <= 255
Minimum increment: 1
Recommended increment: 1
Restriction: Threshold >= 0

Row (input_control)
point.y -> integer
Line coordinate of pixel to be examined.

Col (input_control)
point.x -> integer
Column coordinate of pixel to be examined.

LocalDistance (input_control)
integer -> integer
Distance of the pixel to be examined to the edges of the surrounding rectangle.
Default value: 20
Suggested values: 10, 15, 20, 25, 30
Range of values: 5 <= LocalDistance <= 30
Minimum increment: 1
Recommended increment: 1
Restriction: LocalDistance >= 0

Significance (input_control)
integer -> integer
Maximum difference of the local maximum value in the Hough image to the mean value
Restriction: Significance >= 0

Exist (output_control)
integer -> integer
Indication of existence of a line (0:no, 1:yes).

BeginRow (output_control)
line.begin.y -> integer
Line coordinate of the starting point of the output line.

BeginCol (output_control)
line.begin.x -> integer
Column coordinate of the starting point of the output line.

EndRow (output_control)
line.end.y -> integer
Line coordinate of the ending point of the output line.

EndCol (output_control)
line.end.x -> integer
Column coordinate of the ending point of the output line.


Example
point_in_line
    (Image,1,100,3,10,20,&Exist,&RowBegin,&ColBegin,&RowEnd,&ColEnd);
t_dist_line(RowBegin,ColBegin,RowEnd,ColEnd);

Result

If the parameter values are correct the operator point_in_line returns the value TRUE. The behavior in case of empty input (no input objects available) is set via the operator set_system(::'no_object_result',<Result>:). If necessary an exception is raised.


Possible Predecessors

sigma__, median


Possible Successors

select_lines1, select_lines1, select_longest_lines, line_position, line_orientation



Copyright © 1996-1997 MVTec Software GmbH