【发布时间】:2020-09-08 04:27:07
【问题描述】:
我有以下代码:
image_points_to_world_plane (CamParam, Pose, intersection_points_row, intersection_points_col, 'mm', X1, Y1)
distance_pp (X1[2], Y1[2], X1[3], Y1[3], Measure1)
此代码返回以 mm 为单位的值。
现在代码如下所示,我需要 Regions1 的面积(以 mm² 为单位)。相反,我以像素为单位获取它们..
access_channel(Image, ImageMono, 1)
threshold(ImageMono, Region, 0, 100)
fill_up(Region, RegionFillUp)
reduce_domain(ImageMono, RegionFillUp, ImageReduced)
threshold (ImageReduced, Regions1, 230, 255)
connection (Regions1, Connection)
select_shape(Connection, Labels, 'area', 'and', 2000, 99999)
area_center(Labels, AreaLabels, RowLabels, ColumnLabels)
AreaLabels 以 px² 为单位,我需要它以 mm² 为单位。但是找不到 region_to_world_plane 之类的东西……怎么办?
【问题讨论】:
标签: coordinates region halcon