赞
踩
- 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, ImageConverted, 'byte')
-
- *生成一个ROI区域用来拟合平面
- gen_rectangle1 (ROI_0, 510, 1300, 670, 1460)
- get_region_points (ROI_0, Rows, Columns)
- *将行列坐标乘以对应的分辨率转换成实际X和Y
- xTuple:=Rows*xResolution
- yTuple:=Columns*yResolution
- zTuple:=[]
- *获取Z方向的实际值
- get_grayval_interpolated (Image, Rows, Columns, 'bilinear', zTuple)
- *根据xyz拟合三维平面
- fit_3d_plane_xyz (xTuple, yTuple, zTuple, Ox, Oy, Oz, Nx, Ny, Nz, MeanResidual)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。