halcon real类型深度图转灰度图、转点云图、拟合平面和测量高度

dev_clear_window()
dev_open_window (0, 0, 545, 400, 'black', WindowHandle)
xResolution:=0.04
yResolution:=0.04


* Image Acquisition 01: Code generated by Image Acquisition 01
* list_files ('E:/SMT电容虚焊测高/12-3测试图', ['files','follow_links'], ImageFiles)
* tuple_regexp_select (ImageFiles, ['\\.(tif|tiff|gif|bmp|jpg|jpeg|jp2|png|pcx|pgm|ppm|pbm|xwd|ima|hobj)$','ignore_case'], ImageFiles)
* for Index := 0 to |ImageFiles| - 1 by 1
* read_image (Image, ImageFiles[Index])
* Image Acquisition 01: Do something
* endfor

read_image (Image, 'E:/SMT电容虚焊测高/12-3测试图/12-03-15-34-58-155.tif')
*第一步提取带数据点的区域(tiff深度图有些地方没有数据)
threshold (Image, Region, 0, 20)
*获取该区域的最大最小值
min_max_gray (Region, Image, 0, Min, Max, Range)
*基于深度图的最大、最小值,对深度图转换成灰度图
scale_image_range (Image, ImageScaled, Min, Max)
convert_image_type (ImageScaled, ImageConvert

你可能感兴趣的:(halcon三维测量算法,平面,计算机视觉,深度学习)