Halcon ROI 代码段
Posted yaked19
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Halcon ROI 代码段相关的知识,希望对你有一定的参考价值。
Halcon ROI 代码段
draw_roi:=1
if (draw_roi)
ROI:= [644.586, 1017.66, 1.5708, 255.0, 133.702]
create_drawing_object_rectangle2 (ROI[0], ROI[1], ROI[2], ROI[3], ROI[4], DrawID)
set_drawing_object_params (DrawID, 'color', 'yellow')
set_drawing_object_params (DrawID, 'line_width', 1)
dev_clear_window ()
dev_display (Image)
attach_drawing_object_to_window (WindowID, DrawID)
stop()
dev_set_color ('yellow')
get_drawing_object_params (DrawID, ['row','column','phi','length1','length2'], GenParamValue)
gen_rectangle2 (Rectangle,GenParamValue[0], GenParamValue[1], GenParamValue[2], GenParamValue[3], GenParamValue[4])
detach_drawing_object_from_window (WindowID, DrawID)
endif
ROI:= [1357.87, 868.225, 1.5708, 233.282, 392.85]
gen_rectangle2 (Rectangle, ROI[0], ROI[1], ROI[2], ROI[3], ROI[4])
dev_set_draw ('margin')
dev_display (Rectangle)
reduce_domain (Image, Rectangle, ImageReduced)
以上是关于Halcon ROI 代码段的主要内容,如果未能解决你的问题,请参考以下文章