提问人:Alberto 提问时间:11/8/2023 更新时间:11/8/2023 访问量:39
使用 aruco 标记作为参考的每像素面积估计
Per-pixel area estimation using aruco markers as reference
问:
我在一个场景中有几个ArUco标记和一块绿色纸板。以 ArUco 标记为参考,我想计算场景的每像素面积。绿纸板是探测系统工作的一个例子。现场示例:
正如所观察到的,标记并不总是与相机平行,它们可以呈现任意方向。因此,我必须分析这些方向才能获得每个像素的面积。为了简化这个过程,我现在认为绿色斑块始终与相机平行,并且所有元素的距离都相同。
使用 Python 和 OpenCV,我已经检测到了每个像素掩码的绿色补丁,以及 ArUco 标记的位置、旋转和平移矢量,以及其法线(Z 轴)与相机 Z 轴之间的角度。这是按照这篇文章计算的。
首先,我以为每个像素的面积只取决于 ArUco 标记的 Z 轴和相机 Z 轴之间的这个角度,但它不起作用。
# gt_marker_area_mm is the real size in mm of the ArUco marker
# area is the number of pixel that the ArUco marker presents
# To calculate the per-pixel area with no orientation information
area_mm_per_pixel = gt_marker_area_mm / area
# Calculate per-pixel area with the orientation information.
# The more parallel the ArUco marker normal is to the camera X-axis the bigger the per-pixel area is. It grows quadratically
# Angle radians is the angle between the ArUco marker normal and the camera Z-axes
area_mm_per_pixel_norm = area_mm_per_pixel / area_mm_per_pixel * (np.cos(angle_radians)**2)
绿色斑块的最终面积计算如下:
area_mm_per_pixel_norm * number_of_green_pixels
当 ArUco 标记与相机平行(标记 #0)时,该系统运行良好,但在其方向改变时则不然。
关于如何使用 ArUco 标记信息来计算每个像素面积的任何线索?
答: 暂无答案
评论