Halcon 放大显示目标区域

* 计算区域的外接矩形
smallest_rectangle1 (CharRotatedAll, Row1, Column1, Row2, Column2) ZoomHeight :
= Row2 - Row1 + 1 ZoomWidth := Column2 - Column1 + 1 ZoomFactor := min([768 / ZoomWidth,576 / ZoomHeight]) ZoomRow := (Row1 + Row2) / 2 ZoomColumn := (Column1 + Column2) / 2
* 修改图像的显示部分
* 768原图的宽 576原图的高
dev_set_part (ZoomRow - 576 / ZoomFactor / 2, ZoomColumn - 768 / ZoomFactor / 2, ZoomRow + 576 / ZoomFactor / 2 - 1, ZoomColumn + 768 / ZoomFactor / 2 - 1)

 

posted @ 2020-05-11 19:22  Z大山  阅读(1291)  评论(0编辑  收藏  举报