halcon中Image的像素类型

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

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在学习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_mes
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值