本帖最后由 ZoZoZoZoey 于 2024-8-28 10:54 编辑
请问各位大佬,当get_metrology_object_measures设置参数为'all'时候Row和Column不为空,
- read_image(Image,'C:/Users/Lenovo/Desktop/papers/one shot learning/RegAD/111111111.png')
- *获取图像大小
- get_image_size (Image, Width, Height)
- rgb1_to_gray(Image, GrayImage)
- *打开一个新窗口
- * dev_open_window_fit_image (Image, 0, 0, Width/4, Width/4, WindowID)
- *创建测量句柄
- create_metrology_model (MetrologyHandle)
- *测量直线的起始点坐标
- Row1 := 195
- Column1 := 121
- Row2 := 195
- Column2 := 620
- * 添加一个直线测量工具到测量模型中
- add_metrology_object_line_measure (MetrologyHandle, Row1, Column1, Row2, Column2, 80, 5, 10, 10, [], [], Index)
- * 获取测量工具(例如直线测量工具)的轮廓
- get_metrology_object_model_contour (Contour, MetrologyHandle, Index, 2)
- * 执行测量模型
- apply_metrology_model (GrayImage, MetrologyHandle)
- * 获取测量结果的轮廓
- get_metrology_object_result_contour (Contour1, MetrologyHandle, 0, 'all', 1.5)
- * 获取所有测量点的坐标 (Row和Column)
- get_metrology_object_measures (Contours, MetrologyHandle, 'all', 'all', Row, Column)
- dev_set_color('red')
- gen_cross_contour_xld(Cross, Row, Column, 8, 0.785398)
复制代码
但是改成'positive'和'negative'之后Row和Column都为空,请问这个是为啥咧
- get_metrology_object_measures (Contours, MetrologyHandle, 'all', 'positive', RowP, ColumnP)
- dev_set_color('yellow')
- gen_cross_contour_xld(CrossP, RowP, ColumnP, 8, 0.785398)
复制代码- get_metrology_object_measures (Contours, MetrologyHandle, 'all', 'negative', RowN, ColumnN)
- dev_set_color('blue')
- gen_cross_contour_xld(CrossN, RowN, ColumnN, 8, 0.785398)
复制代码
|