Closed johningve closed 2 months ago
Please consider changing the format of corners_in_pixel_coordinates
in order to simplify the following (which is currently required):
rgba = camera_frame.point_cloud().copy_data("rgba")
rgb = rgba[:, :, :3].copy().astype(np.uint8)
if marker_list is not None:
detected_markers = detection_result.detected_markers()
detected_corners = [
np.array(marker.corners_in_pixel_coordinates).reshape((4, 1, 2))
for marker in detected_markers
]
marker_ids = np.array([marker.id for marker in detected_markers])
rgb = cv2.aruco.drawDetectedMarkers(rgb, detected_corners, marker_ids, [0, 255, 0])
@eskaur @Frontier789 could you advise on this?
Do we have the same issue in C++ then? Or is this just a problem in python?
Do we have the same issue in C++ then? Or is this just a problem in python?
In C++ we return our own special types (std::array<Zivid::PointXY,4>), so the user has to do some conversion before passing it to OpenCV anyway. Therefore I don't consider this an issue in C++. In python it becomes more tempting to be super compatible with 3rd party APIs since we return universal stuff like lists and numpy arrays.
Working on making the corner getters return numpy arrays.
This commit adds API wrappers for the SDK 2.13 fiducial marker detection and hand-eye calibration.
Added to the
zivid.calibration
module are the classesMarkerShape
,MarkerDictionary
, andDetectionResultFiducialMarkers
, as well as the functiondetect_markers
. TheDetectionResultFiducialMarkers
class can be used to construct aHandEyeInput
, just likeDetectionResult
.The hand-eye test data was updated with some newer ZDFs that were downsampled to save on Git LFS bandwidth.