Camera Calibration with MATLAB

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
camera calibration is a technique used to improve the quality of images captured with the camera by correcting for lens distortion or to measure object dimensions in world units a calibrated camera is an essential component in applications like robotics for navigation and 3d scene reconstruction in this video you will see how easy it is to perform camera calibration using MATLAB for cameras including fisheye lens and stereo vision camera calibration involves determining the characteristics of a camera that are known as intrinsic and extrinsic parameters intrinsic parameters define the internal characteristics of the camera such as focal length of the lens optical center and lens distortion coefficients knowing this parameters allows us to improve image quality correct for lens distortion and map real-world distances to pixels extrinsic parameters define the location of the camera and space with reference to a fixed object and these parameters are essential to stereo calibration and structure from motion computer vision toolbox provides both matlab functions and an interactive app for performing camera calibration the camera calibrator app is an easy and interactive interface to complete the calibration workflow first add calibration images of a checkerboard calibration pattern a checkerboard is used because it's regular pattern makes it easy to detect automatically it is recommended to use between 10 and 20 images for accurate calibration results next enter the size of the checkerboard square in world units so millimeters centimeters or inches this is a necessary step to find the mapping between world units and image pixels the app then automatically detects the checkerboard calibration pattern in the provided images then you can check the accuracy of the checkerboard detector by zooming in to inspect the results this helps with finding incorrect detections and removing bad images under options you can also specify the number of radial distort coefficients calculated Ravin distortion occurs when light rays Bend a greater amount near the edges of lens then they do at the optical center typically two coefficients are enough but for severe distortion as in the case of a wide-angle lens three coefficients might be necessary you can also enable the estimation of tangential distortion this distortion occurs when the lens and camera sensor are not parallel now press the calibrate button to solve for camera parameters once calibration is done you can evaluate calibration results by visualizing reprojection errors the projection errors are a global measure of calibration error and are the difference between points detected in the image and points reprojected back onto the image using the camera parameters that he just calculated this is helpful to identify bad images that you can remove and calibrate for better results you can also visualize the extrinsic parameters to see which angles calibration images are taken from this is useful to find out when calibration images aren't captured from enough angles and more images might be needed to improve calibration results now that you have the calibrated camera parameters you can map pixels in an image to world units for measuring object dimensions and distance from the camera here is an example available with the computer vision toolbox that shows how to measure the diameter of a couple of pennies shown in the image on the right here now that we have seen the calibration workflow of a standard camera let's look at the same for a fisheye or a wide-angle lens unlike the standard camera lenses these cameras use a complex series of lenses to enlarge the cameras field of view enabling it to capture right panoramic or hemispherical images however the lenses achieved this extremely wide-angle view by distorting the lines of perspective in the images in the app choose the camera model option as fisheye under options you can now choose to enable the estimation of alignment between the sensor and the image plane after running calibration you can view the undistorted images that have been compensated for lens distortion lens distortion is a common problem and causes straight lines to appear curved knowing the camera intrinsic parameters lets us apply an under store and retain that removes the lens distortion and you now see the edges that appear curled have been straightened out correcting for lens distortion is very useful in computer vision applications like stitching images together to form a panorama that require images to be undistorted to work well finally let's look at the calibration workflow for stereo cameras using MATLAB ste revision is the process of recovering depth from camera images but comparing two or more views of the same scene the output of this competition is useful to design a 3d point cloud where each 3d point corresponds to a pixel in one of the images the stereo camera calibrator app in MATLAB allows you to estimate geometric parameters of each camera in a stereo camera pair in the app load calibration checkerboard images for the two cameras separately and then follow the same steps as before to perform calibration and analyze the results the reprojection error bar graph here displaced the mean reprojection error per image along with the overall mean error clicking show rectified option in the view section shows the effects of stereo rectification if the calibration is accurate the images become distorted and row aligned refer to the link in the description for a detailed example on depth estimation from stereo vision in the documentation thank you for watching this video and please visit Matt works.com for more information on camera calibration
Info
Channel: MATLAB
Views: 33,181
Rating: 4.9529409 out of 5
Keywords: MATLAB, Simulink, MathWorks, Computer Vision Toolbox, Image Processing Toolbox, Image Acquisition Toolbox
Id: x6YIwoQBBxA
Channel Id: undefined
Length: 5min 52sec (352 seconds)
Published: Fri Jul 12 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.