Calculate the distance between one line segment and one region.
The operator ::distance_sr calculates the distance between one line segment and one region. Row1, Column1, Row2, Column2 are the the initial and end coordinates of the line segment. The parameters DistanceMin and DistanceMax contain the resulting distances.
Due to efficiency of ::distance_sr holes are ignored. Furthermore, if the lines intersects the region a minimal distance larger than 0.5 can be returned.
|
Region (input_object) |
region -> Hobject: HRegion |
| Input region. | |
|
Row1 (input_control) |
point.y(-array) -> HTuple.double / long |
| Row of the first point of the line segment. | |
|
Column1 (input_control) |
point.x(-array) -> HTuple.double / long |
| Column of the first point of the line segment. | |
|
Row2 (input_control) |
point.y(-array) -> HTuple.double / long |
| Row of the second point of the line segment. | |
|
Column2 (input_control) |
point.x(-array) -> HTuple.double / long |
| Column of the second point of the line segment. | |
|
DistanceMin (output_control) |
number(-array) -> (HTuple.) double * |
| Minimal distance between the line segment and the region | |
|
DistanceMax (output_control) |
number(-array) -> (HTuple.) double * |
| Maximal distance between the line segment and the region | |
threshold(Image, &Region, 0.0, 120.0);
distance_sr(Region,row1,column1,row2,column2
&distance_min, &distance_max);
::distance_sr returns H_MSG_TRUE.
::distance_lr, ::distance_pr, ::diameter_region
::hamming_distance, ::select_region_point, ::test_region_point, ::smallest_rectangle2
Basic operators