select_region_point和select_region_spatial

 

一、select_region_point

select_region_point(Regions:DestRegions:row,column:)

 

Operator Meaning: Select all regions containing a given pixel.

Regions Region is set to be tested, DestRegions to all the regions comprising the pixels of a given set.

 

For example as follows:

 1 read_image (Image, 'C:/Users/02/Desktop/shape.png')
 2 threshold (Image, Region, 0, 50)
 3 fill_up (Region, RegionFillUp)
 4 difference (RegionFillUp, Region, RegionDifference)
 5 opening_circle (RegionDifference, RegionDifference, 1.5)
 6 
 7 connection (RegionFillUp, ConnectedRegions)
 8 *RegionHub中共有3个元素
 9 concat_obj (ConnectedRegions, RegionDifference, RegionHub)
10 
11 row := 175
12 col := 253
13 select_region_point (RegionHub, DestRegions, row, col)
14 dev_display (Image)
15 dev_display (DestRegions)
16 gen_cross_contour_xld (Cross, row, col, 6, 0.80)

In fact, it will be screened in all regions including the point (175, 253) is out. The operator of the Region in some projects require screening might be helpful.

 

二、select_region_spatial

select_region_spatial(Regions1, Regions2 : : Direction : RegionIndex1, RegionIndex2)

 

Operator Meaning: screening according pose of the region.

 

Guess you like

Origin www.cnblogs.com/xh6300/p/11447673.html