在学习halcon算子sub_image(ImageMinuend, ImageSubtrahend : ImageSub : Mult, Add : )时,在样例中遇到了一个操作
* This example demonstrates how to subtract two images
* using the operator 'sub_image'.
*
*
dev_close_window ()
dev_update_off ()
*
* Read two images and convert them
read_image (Scene00, 'autobahn/scene_00')
read_image (Scene01, 'autobahn/scene_01')
convert_image_type (Scene00, ImageConverted1, 'int2')
convert_image_type (Scene01, ImageConverted2, 'int2')
*
* Display the input images for the subtraction
dev_open_window_fit_image (ImageConverted1, 0, 0, -1, -1, WindowHandle)
set_display_font (WindowHandle, 16, 'mono', 'true', 'false')
dev_display (ImageConverted1)
disp_message (WindowHandle, 'Image 1', 'window', 12, 12, 'black', 'true')
disp_continue_message (WindowHandle, 'black', 'true')
stop ()
dev_display (ImageConverted2)
disp_message (WindowHandle, 'Image 2', 'window', 12, 12, 'black', 'true')
disp_continue_message (WindowHandle, 'black', 'true')

本文探讨了在Halcon中使用sub_image算子前将图像类型转换为'int2'的原因。虽然了解到'int2'是像素类型之一,但具体转换原因尚未明确。通过对比转换前后图像相减的操作,作者发现两者似乎没有明显差别。
最低0.47元/天 解锁文章
923

被折叠的 条评论
为什么被折叠?



