各位大神
請問下圖 如何將中間白色部分填滿
因為圖形模板建模時 沒問題
但在找尋模板時候 就會出錯
還是有更好的算法思路 大神可以提供一下
謝謝
附上卡關的程式碼
- dev_display (Image)
- set_display_font (WindowID, 22, 'mono', 'true', 'false')
- disp_continue_message (WindowID, 'black', 'true')
- draw_rectangle2 (WindowID, Row, Column, Phi, Length1, Length2)
- gen_rectangle2 (Rectangle2, Row, Column, Phi, Length1, Length2)
- reduce_domain (Image, Rectangle2, ImageReduced)
- bin_threshold (ImageReduced, Region)
- connection (Region, ConnectedRegions)
- select_shape (ConnectedRegions, SelectedRegions, 'area', 'and', 500.0, 99999)
- union1 (SelectedRegions, RegionUnion)
- fill_up_shape (RegionUnion, RegionFillUp, 'area', 10.0, 99999.9)
- opening_circle (RegionFillUp, RegionOpening, 5.0)
复制代码
|