一.Halcon區(qū)域幾何變換
1.move_region 平移
算子參數(shù):
move_region(Region : RegionMoved : Row, Column : )
1.Region(輸入要移動的區(qū)域)
2.RegionMoved(輸出移動后區(qū)域)
3.Row(輸入要移動區(qū)域的向量的行距離 point.y )
4.Column(輸入要移動區(qū)域的向量的列距離 point.x)
實例:文章來源:http://www.zghlxwxcb.cn/news/detail-400413.html
dev_close_window ()
dev_open_window (0, 0, 512, 512, 'white', WindowID)
dev_set_color ('black')
dev_set_draw ('margin')
dev_clear_window ()
* Draw with the mouse an arbitrary region into the window
draw_region (Region, WindowID)
area_center (Region, Area, Row1, Column1)
Button := 1
while (Button == 1)
* 獲取鼠標(biāo)點擊的坐標(biāo)
get_mbutton (WindowID, Row, Column, Button)
*兩個坐標(biāo)相減得出要平移的距離
move_region (Region, RegionMoved, Row - Row1, Column - Column1)
endwhile
效果圖:
文章來源地址http://www.zghlxwxcb.cn/news/detail-400413.html
到了這里,關(guān)于Halcon區(qū)域幾何變換和仿射變換的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!