Halcon知识 : 乘法图像融合
生活随笔
收集整理的這篇文章主要介紹了
Halcon知识 : 乘法图像融合
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1 算子mult_image
halcon提供的關于融合圖像的問題mult_image算子是圖像融合的工具;
?其中:g1是圖像omage1的像素,g2是圖像omage2的像素,Mult是一個系數,Add是偏移,一般是0,即無偏移。
2? 代碼
* This example demonstrates how to multiply two images using * the operator 'mult_image'. * * dev_close_window () dev_update_off () * * Read an input image and generate a second input image * by creating a gray value ramp read_image (Scene00, 'autobahn/scene_00') gen_image_gray_ramp (ImageGrayRamp, 0.5, 0.5, 128, 256, 256, 512, 512) * * Display the input images for the multiplication dev_open_window_fit_image (Scene00, 0, 0, -1, -1, WindowHandle) set_display_font (WindowHandle, 16, 'mono', 'true', 'false') dev_display (Scene00) disp_message (WindowHandle, 'Multiply the image with a gray value ramp', 'window', 12, 12, 'black', 'true') disp_continue_message (WindowHandle, 'black', 'true') stop () dev_display (ImageGrayRamp) disp_message (WindowHandle, 'Created gray value ramp', 'window', 12, 12, 'black', 'true') disp_continue_message (WindowHandle, 'black', 'true') stop () * * Multiply the images with factor 0.005 for the gray value * adaption and display the resulting image mult_image (Scene00, ImageGrayRamp, ImageResult, 0.005, 0) dev_display (ImageResult) disp_message (WindowHandle, 'Resulting image of the product', 'window', 12, 12, 'black', 'true')三、融合效果
輸入圖像image1和image2
?輸出融合圖像
?
總結
以上是生活随笔為你收集整理的Halcon知识 : 乘法图像融合的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Halcon知识: XLD的概念
- 下一篇: AI 趋势