-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add marker detection and hand-eye API wrappers #276
Add marker detection and hand-eye API wrappers #276
Conversation
63286a7
to
0e13146
Compare
5a9db06
to
1d7d1ee
Compare
cdf26c8
to
2377821
Compare
eedda83
to
84dff92
Compare
Please consider changing the format of 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? |
84dff92
to
adf54d8
Compare
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::arrayZivid::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. |
adf54d8
to
0baa19f
Compare
Working on making the corner getters return numpy arrays. |
0baa19f
to
de0ae4d
Compare
caae349
to
21385fd
Compare
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 classes `MarkerShape`, `MarkerDictionary`, and `DetectionResultFiducialMarkers`, as well as the function `detect_markers`. The `DetectionResultFiducialMarkers` class can be used to construct a `HandEyeInput`, just like `DetectionResult`. The hand-eye test data was updated with some newer ZDFs that were downsampled to save on Git LFS bandwidth. Co-authored-by: Eskil Aursand <[email protected]>
21385fd
to
320f539
Compare
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.