How to get the original unrectified pixels locations of the pointcloud created by rectification which changed the image due to it?
2 views (last 30 days)
Show older comments
Hi, so during creating a point cloud using calibration parameters matlab enforces you to rectify the images. My image is 720x1280 and after rectification it becomes 486 x 976. From the rectified images I can succesfully create the desirable pointcloud, but now assume that the images that callibrated between them to create the point cloud are aligned with some other camera during also a calibration process.
The rectification distorted the image for the puprose of point cloud creation and also distorted the previously done alignement with other images. For each point in the created pointcloud I know it's pixel coordiantes because the points created from the rectified images and the rectified images have the same dimensions. i.e in my case 486x976. But what if I need the correspondence to the original 720x1280 dimensions ?
I understand that even if there is a way to do so, the number of point became less, so I lost some information to eventually to build a 3d pointcloud and thats ok for me. But how can I know for example the (x,y,z) for the (1,1) (or for another point for which it exists, because as I said there are less points, so it may not exist for this or that specific point) location in the images before rectification ?
Matlab doesn't consider the case and doesn't support this functionality ?
See the comments for more clarification.
Thank you in advance.
2 Comments
Image Analyst
on 22 Apr 2022
What's your definition of "rectification"? Also, can you attach screenshots?
Answers (1)
Aishwarya
on 10 Feb 2024
Hi Ilya,
Based on the details provided, it appears you are seeking a method to establish the correlation between the points in a 3D point cloud, which has been generated from rectified stereo images, and the corresponding pixel coordinates in the original unrectified images.
Here are a few insights that can help with the query:
- As rectification is performed using the “rectifyStereoImages” function, MATLAB internally computes a mapping (undistortion and rectification) that transforms points from original images to the rectified images. However, there does not appear to be any parameter that can give information about the mapping.
- One way to get the correspondence between a rectified image and its original image is by performing feature matching between, say, the rectified right image and the original right image.
- Alternatively, you could utilize the 3D world points that have been reconstructed and project them back onto the original image plane using the camera's projection matrices.
You can refer to the “rectifyStereoImages” documentation for more information: https://www.mathworks.com/help/vision/ref/rectifystereoimages.html
I hope this clarifies your query!
0 Comments
See Also
Categories
Find more on Camera Calibration in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!