halcon 处理金属表面凹坑

dev_update_off ()
dev_open_window (0, 0, 640, 512, 'black', WindowHandle)
set_display_font (WindowHandle, 14, 'mono', 'true', 'false')


*裁切ROI区域
gen_empty_obj (Images)
list_image_files ('E:/12.21danAdoufangxiang/新建文件夹', 'default', [], ImageFiles)
read_image (ImageFirst, 'E:/A/12.21danAdoufangxiang/新建文件夹/index_1.bmp')
dev_display (ImageFirst)
draw_rectangle1 (WindowHandle, Row1, Column1, Row2, Column2)
gen_rectangle1 (Rectangle, Row1, Column1, Row2, Column2)
for Index1 := 0 to 3 by 1
    read_image (ImageIndex, ImageFiles[Index1])
    reduce_domain (ImageIndex, Rectangle, ImageReduced)
    concat_obj (Images, ImageReduced, Images)
endfor

*photometric_stereo参数设置
Slants := [80,80.5,80.5,80.4]
Tilts := [-90,-178,0,90]
ResultType := ['all']
photometric_stereo (Images, HeightField, Gradient, Albedo, Slants, Tilts, ResultType, 'poisson', [], [])

derivate_vecto

你可能感兴趣的:(视觉_Opencv)