-
Notifications
You must be signed in to change notification settings - Fork 17
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
Regarding Rectification Map #14
Comments
Hi @Ethan-Zhou The Can you specify, how you came to the conclusion that the GT is not aligned properly? Do you have a code example that I can look at and a visualization? What exactly is the procedure and on which sequence(s)? |
You cannot use There are two ways to achieve the rectification of event data.
What went wrong? You were mixing 1) and 2) by backward warping with the forward warping mapping. How can you resolve this issue? Either use 1) or fix 2). Approach 1) is already implemented in the dataloader that I provide so I am briefly explaining how fix 2) for the example of the left event camera (cam index 0): # Pseudo code for loading calibration from cam_to_cam.yaml per sequence:
# K_dist <- intrinsics[cam0][camera_matrix]
# dist_coeffs <- intrinsics[cam0][distortion_coeffs]
# R_rect0 <- extrinsics[R_rect0]
# K_rect <- intrinsics[camRect0][camera_matrix]
# resolution <- intrinsics[camRect0][resolution]
#
# representation <- load your favorite event representation
mapping = cv2.initUndistortRectifyMap(K_dist, dist_coeffs, R_rect0, K_rect, resolution, cv2.CV_32FC2)[0]
rect_representation = cv2.remap(representation, mapping, None, interpolation=cv2.INTER_CUBIC) Note that approach 2) cannot be used to rectify raw events directly because the problem is ill-posed (except if nearest-neighbor "interpolation" is used). Backward warping attempts to reconstruct a pixel value via interpolation of neighboring pixels. However, for event data the value of neighboring pixels is only defined exactly when an event appears such that a naive application of backward warping fails. This is why 2) only applies to image-like representations of event data. Let me know if this resolves this issue. |
Hi,
I found the dispaity_events GT were misaligned with the rectified event map (obtained by accumulating a number of events on the image plane without motion compensation). To double check this, I would like to confirm the follwing definition with you.
I wonder if the provided rectify_map is equivalent to that used by the cv.remap function (https://docs.opencv.org/3.4/da/d54/group__imgproc__transform.html#gab75ef31ce5cdfb5c44b6da5f3b908ea4).
The "rectify_map" looks like the forward mapping funciton, while the one used by the cv.remap function is the inverse mapping function, right?
Thanks in advance.
The text was updated successfully, but these errors were encountered: