Choose all regions containing a given pixel.
The operator select_region_point selects all regions from Regions containing the test pixel (Row,Column), i.e.:
|Region[n] intersection {(Row,Column)}| = 1
If the regions overlap more than one region might contain the pixel. In this case all these regions are returned. If no region contains the indicated pixel the empty tuple (= no region) is returned.
|
Regions (input_object) |
region-array -> object |
| Regions to be examined. | |
|
DestRegions (output_object) |
region-array -> object |
| All regions containing the test pixel. | |
|
Row (input_control) |
point.y -> integer |
| Line index of the test pixel. | |
| Default value: 100 | |
| Typical range of values: -oo <= Row <= -oo (lin) | |
|
Column (input_control) |
point.x -> integer |
| Column index of the test pixel. | |
| Default value: 100 | |
| Typical range of values: -oo <= Column <= -oo (lin) | |
read_image(Image,'fabrik') open_window(0,0,-1,-1,'root','visible','',WindowHandle) disp_image(Image) regiongrowing(Image,Seg,3,3,5,0) set_color(WindowHandle,'red') set_draw(WindowHandle,'margin') Button := 1 while (Button = 1) fwrite_string(FileId,'Select the region with the mouse (End right button)') fnew_line(FileId) get_mbutton(WindowHandle,Row,Column,Button) select_region_point(Seg,Single,Row,Column) disp_region(Single,WindowHandle) endwhile
If F is the area of the region and N is the number of regions, the mean runtime complexity is O(ln(sqrt(F)) * N).
The operator select_region_point returns the value 2 (H_MSG_TRUE) if the parameters are correct. The behavior in case of empty input (no input regions available) is set via the operator set_system('no_object_result',<Result>). If necessary an exception handling is raised.
select_region_point is reentrant and automatically parallelized (on tuple level).
threshold, regiongrowing, connection
Region processing