OpenCV Python Camera Calibration (Intrinsic, Extrinsic, Distortion)

preview_player
Показать описание
In this video, I will go over how to do camera calibration in OpenCV using python in VS Code. I will show you how we can take several images of chessboard pattern and use that to find our camera parameters (intrinsics and extrinsics). This will let us find our focal length, camera center, distortion coefficients, rotation and translation vectors. I will then show you how to remove distortion from an image.

0:00 Introduction
0:19 What is camera calibration? (Intrinsic, Extrinsic, Pinhole Model)
3:37 Why do we need camera calibration?
3:50 How does camera calibration work?
5:20 Code

Thanks for watching! If you found this video helpful, please like, subscribe and share:

Social:
Рекомендации по теме
Комментарии
Автор

Hi! New subscriber here! Happy to see you cover the implementation of classic computer vision concepts in python, recently started learning computer vision and was getting a bit discouraged with some nebulous concepts floating around my head, your channel is uplifting, glad to have found it.

electric_sand
Автор

really good explanation.. Thank you so much

helviohild
Автор

I run the runCalibration(), and i don get any error but nothing happens, just "Press return to continue"

Great video

berenicehero
Автор

How can I learn more about the linear algebra that is happening here? I generally understand what is happening, but actually how we get some of the matrices such as the rotation one seems really interesting.

Traptrickerplays
Автор

Hi there, should the world points be rescaled in the correct (real) size? I mean, if you used a chessboard with 1cm blocks size the world points should be equal to (0.01, 0, 0), (0, 0.01, 0)... right? Do you account for this or we do not have to account for this? If the latter is true, why is that?

UPDATED QUESTION: Doing some experiments i found out that only the tvecs change when changing the size of the chessboard blocks (e.g. experiments with 1m chessboard blocks :) and 1cm). We care more about the camera intrinsic matrix so i guess we do not care the exact block size?

orfeasfilippopoulos
Автор

At ~4:20, you mention "mapping between world points and image points", but isn't this equation relating two (2D) image points [x_i, y_i] and [X_i, Y_i] from the left and right image, rather than describing the relationship between (2D) image and (3D) world points? Otherwise, why is there no Z_i component in the [X_i, Y_i, 1] vector?

The matrix H stands for "homography", which is a projective transformation that maps coordinates on one (planar) image to another image.

ChrisOffner
Автор

This is incredibly helpful - thank you! Do you share your code anywhere please? - It looks like your Github profile doesn't have any public repositories...

pureph
Автор

Great video. Does this help in removing perspective distortion. I am doing a project on automatic garment measurement using computer vision. I have found key-points of the garment but when finding the measurement the pixel to distance scale doesn't remain valid for all the measurement because parts closer to the camera will have a different pixel-to-distance ratio compared to parts further away. So using this code will help in fixing it?

tseringjorgais
Автор

Hi, Kevin! It's nice to see your tutorial videos, cause they really help me a lot to thru my digital image processing project. But as a beginner, ive a question (im so sorry if youve already explain it in your video, i just, i still didnt understand yet about how this calibration works). Lets say i want to do estimate measurement with image processing. Some papers said, that i should take the calibration first before i do the measurement. If i already do the calibration, does the fix parameters (intrinsic and extrinsic) will be "saved" in the camera? How could we do that...? And if its so, so, when i want try to capture an image with my camera, i dont have to run the calibration code (cause the camera have already "set" in the camera)? Or i should run the code again or merge the calibration code with my image processing code? Sorry for the question, I really thank you a lot if you are willingly to explain me some..

dyahlangensari
Автор

UnboundLocalError: local variable 'imgGray' referenced before assignment
i am getting this error

divy
Автор

wwhere are k1 k2 and k3 of distortion matrix comes from?

ltd
Автор

Hey, a really good video, but could you tell me where can I see the equiations, because i want to understand that, I would appreciate it

cuauhtemocazaelbecerralope