Reputation: 33
I am trying to implement visual odometry algorithm via matlab. According to step 2 in http://en.wikipedia.org/wiki/Visual_odometry. I need to do image correction before feature detection, matching and motion estimation. I think I need to undistort image like the function (here) in matlab. Can I use the original intrinsic and extrinsic parameter for motion estimation after matching the feature? I think the intrinsic parameter is for the distorted image.
I am confused that in the Camera Calibration Toolbox for Matlab. The intrinsic matrix can only turn the pixel back to distorted plane. If I do image correction first before feature detection according to step 2 in wiki. I think the original intrinsic matrix would cause some error.
Upvotes: 3
Views: 499
Reputation: 39389
To use the undistortImage
function you need to calibrate your camera using the Camera Calibrator App or the estimateCameraParameters
function in the Computer Vision System Toolbox.
Upvotes: 0
Reputation: 2660
Here are the steps you need to do:
The calibration you get include the 3x3 intrinsic matrix (K) of the undistorted image, as well as a vector of distortion coefficients.
Use K and the distortion coefficients to "undistort" the images.
Disclaimer. You can do VO without undistorting images, but depending on the degree of image distortion using the raw images might affect the feature/descriptor detector. It is also more work per iteration to map between distorted and undistorted
Good luck
Upvotes: 1
Reputation: 36096
First, there are several visual odometry libraries that already exist for matlab. One of those is http://www.cvlibs.net/software/libviso/
However, if you plan to implement it yourself and are looking for a way to rectify your images, you can get the intrinsic/extrinsic camera parameters using the camera calibration matlab toolbox: http://www.vision.caltech.edu/bouguetj/calib_doc/
Upvotes: 0