Halcon快速入门笔记2
read_image (Image, ‘I:/Halcon练习/练习2/练习2.png’)
get_image_size (Image, Width, Height)
*在频域中生成高斯滤波器
gen_gauss_filter (ImageGauss, 100, 100, 0, ‘n’, ‘rft’, Width, Height)
*对图像进行傅里叶变换
rft_generic (Image, ImageFFT, ‘to_freq’, ‘none’, ‘complex’, Width)
*对傅里叶图像做卷积,使用之前创建的高斯滤波器作为卷积核
convol_fft (ImageFFT, ImageGauss, ImageConvol)
*将卷积后的傅里叶图像还原为空间域图像。可见图像的突变部分得到了增强
rft_generic (ImageConvol, ImageFFT1, ‘from_freq’, ‘none’, ‘byte’, Width)
sub_image (Image, ImageFFT1, ImageSub, 5, 100)
*对图像进行缩放,一般图像特别大的时候,缩放一下,提取效果会更好
zoom_image_factor (ImageSub, ImageZoomed, 0.4, 0.4, ‘constant’)
*将图像中的有灰度差异的线条提取出来
lines_gauss (ImageZoomed, Lines1, 0.2, 3, 8, ‘light’, ‘true’, ‘gaussian’, ‘true’)
本文来自博客园,作者:{视觉人机器视觉},转载请注明原文链接:https://www.cnblogs.com/visionman/p/17405227.html