BEJ34202 Vision System : Camera Calibration Using MATLAB

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi and assalamualaikum so in this video i will demonstrate on how to make a calibration using matlab for finding the distortion from the picture that i've been taken from smartphone so the smartphone that i have used is iphone 11 all right first thing uh what we need to do is we have to take a picture at least five pictures so here is the picture that i have snapped before right picture one two three four and five right so after that we open matlab right so uh what we need to do next is uh we have to upload a folder in the current folder here uh for the coding all right so for coding what we need to do is we have to find it in the google we just type caltech camera calibration right so we scroll down and this is it we have to download it right here okay after we download right so what we need to do is we have to upload it the toolbox calip in the current folder here is it okay and then the picture that we have take uh before we have to paste it also in the uh calibration in the toolbox uh calip that we uh that we have uploaded in the current folder right so in the command window what we need to do is we have to type calip underscore gui and then we click standard image names right okay so uh here we have to click color the file name and this is the for the image format jpg right so we just need to wait until the loading image okay so this is the uh the picture that we have to calibrate okay next what we need to do is okay in the calibration tools we have to extract we have to extract the image so right here we just have to enter and uh here we have to click five uh the format is five five enter and enter right so right here we have to uh click for a corner uh to find it the uh where is the uh position uh we want to calibrate so in this picture we click here here yeah and here all right so and then we click enter enter enter so here it is right so we just have to repeat the same step for the next four picture all right so uh this is the uh green mark uh here is represent for detected points and then uh this uh plus uh rate symbol is represent for reprojected points so after we done clicking all four position for all five pictures right so what we need to do is we click back the calibration tools and then we click uh show in string six uh parameters right so here is it all right so in this extrinsic uh parameters uh what we can see is uh this uh red box is represent for the camera and this uh five uh object here in this for this uh five grid box here uh is where is the image is located right while if we switch to world center view right here what we can see is what we can see is the this is a five a floating box where it is uh represent for the camera in different angle right and this grid box here is represent for the image right so next uh what we need to do is we need to uh click back the calibration toolbox here right so uh we click uh the analyze error in okay so for uh for this graph what we can see is a different plus symbol color where every color is represent for the images right so for this green this green is represent for uh image tree all right so this red represent for image uh two right this blue here is represent for image one and this light blue is represent for image five and black is represent for image four so if we click uh one by one uh the symbol it will show the details right here it will show the details right here uh that we that what we need to know uh so like uh image coordinates the pixel error and other uh details that uh that shows here right so uh what we can what we can analyze uh from this uh graph is uh if the symbol is near to uh y uh 0 y equal to 0 and x equal to 0 0 it means that the distortion is low so if the symbol is far from x equal to zero and y equal equal to zero uh it means that the distortion is uh the distortion for the image is high right so like example this uh green is far from x equal to zero and y equal to equal to zero so that means is the the distortion is high so for this black uh okay i take example for this black or this light blue we can see that it's near to x equal to zero and y equal to zero so that means the distortion for the image is low all right so for the last part is what we need to do is we just have to click back the calibration toolbox and then uh we need to get the undistort image so we just click this undistort image and then it will uh loading and then it will save the undistorted image in the current folder so you can find it right right there so that's all for the demonstration video so thank you bye assalamualaikum my name is and my metric number is 8170131 today i'm going to present to you my assignment one for a vision system which is i will be using matlab where i downloaded camera calibration toolbox from caltech camera calibration so the device that we'll be using is huawei nova 7i which has 48 megapixels so i have downloaded the toolbox and load it here and then i will be using five sample pictures which will be named as color one two three four and five so the first step is type calib or calip underscore gui and then press enter and then we'll pick the standard one and then the image name so as i said before the base name will be color which is here that will type color and then the file is jpeg now it will load my sample pictures which is one until five so these are my sample pictures that i've took and then i will click on extract grid corner so here numbers of image to process so i just press enter and then if i want to use default i can use default but i will use 5 instead then 5 again and just press enter so i have to extract the grid corners for each and every pictures that i have the images the sample images that i have so this is my image one then i just press enter then here just press enter as well uh as well enter as well and then the second image that i have now just press enter alright then this is my third image and just press enter again and then again okay this is my fourth image and then i just press enter and this will be my last image for me to extract the great corner all right now just press enter again all right then here it says done so after it says done i'll have to do calibration then they will show two calibration parameters which are after initialization and after optimization so we're going to look at the after optimization here then i have the focal length principle point skew distortion as well as pixel error so for skew and distortion as you can see this is zero and then for distortion this is zero as well at point number five this is because uh pixel axis for x and y is 90 degrees this is an assumption by matlab and then after i do this i just have to click the show exchange okay so as you can see here this is where my camera location is this is for extrinsic and then this is where my cam camera will be located and these are the images that will be formed that is captured and the position of the images so as you can see this is image which is color number one that i took the image will be captured like that and then the image for color 2 is captured like that by the camera and then the image 3 the color 3 will be captured like that by the camera and number 4 as well as number five here the blue colored one and then i can click on the row as well and then i can see here this is my image this is the picture i took and then this will be the cameras located for the image to be formed so this is where the cam uh the color one camera is in order to take the picture this is camera 2 for color 2 this is color 3 this is color 4 like that and then this is color 5. after that i can analyze the area as you can see the distribution is quite high means that there are errors and this is image tree as i click here the furthest point and then the last one will be uh i click on the undistort image so here i just press enter and then i just have to wait for a while for it to save inside my file so we will save the color 1 color 2 color 3 color 4 as well as color 5 the undistorted version and done so i can go back to the file that i've saved there the toolbox calip and then i can see here this is my color red one after i i've undistorted it and then this is color red two this is color tree at 4 color right 5. this is the original image that i took well that is all from me thank you my name is my major number is ce180 okay i will show how to do the camera calibration using a matlab first step is we have to capture the picture of checkerboard so i already take a picture of checkerboard using a smartphone which is i use iphone 12 so after transfer to the computer we have to copy this image and transfer to the folder of toolbox calibration that i installed from the internet so this is the picture that i already copy and paste in the folder and then we open the matlab and we have to make sure that the folder of toolbox is already select and put in the matlab so this is the folder and we have to make sure the picture that we placed on the folder have in this so this is the image that i put and so the first command that we have to do is call calip underscore gui and this is when we must choose the stand one which is all the image are stored in memory which uh we press the step one and for the first one is image name so basement uh that image that i put is image so we type image and the image format is gpg let me see loading for the five image that i already captured using a smartphone so this is the picture of checkerboard that i already captured and then can exit the big corner so this is uh how many pictures that i want to process uh just press enter which is the all image that i want to process and enter enter and enter so for this one we have to [Music] put the for location at the checkerboard image so press enter and this is the size of square that inside the checkerboard for the only one [Music] image of checkerboard that are already captured okay the last image then then we can calibrate the image and press the button of calibration and the result is come up so this is the result of the calibration and this is the value of the distortion of the image and focal length principle point and pixel error and then we can show the s6 x3 in stick so this one you can see that this is the camera that i captured and this is the image which is have the different angle that i captured which is the camera is static and the image is with different angles you can switch to the position of the camera and the image is static and this is the position of the so then we can also analyze the error so this is the error of the five image that i get checked so we can know that the uh nearest uh point to the zero so the less error that at the image so we can see that here they have area and then we can [Music] undistort the image and press it and it asks uh want to all undistort all the calibration image so press enter so it will restore all the images it will save the image uh after in the undistorted it will save the image under image right one and until the red five which is have five picture that i already captured and do the calibration using this matlab me okay done so this uh the picture of the undisturbed image is already in this toolbox folder is this one you can see that the image of distortion image that are already using the calibration of matlab and we can see undisturbed image that already matlab facebook okay this is the undisturbed image that i get from the calibration of the matlab this one the f5 so it's okay we can see that they have do some the effect for the undisturbed image since this is the real one the real picture that i already captured using the smartphone and after distortion it will be like this okay that's all from me thank you
Info
Channel: Iskandar Mahmud
Views: 432
Rating: 5 out of 5
Keywords:
Id: iCAiDShWIYg
Channel Id: undefined
Length: 25min 22sec (1522 seconds)
Published: Thu Nov 19 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.