neozhaoliang / surround-view-system-introduction

A full Python implementation for real car surround view system
MIT License
858 stars 303 forks source link

Issue with Camera Calibration #94

Closed Aryan-Chharia closed 1 month ago

Aryan-Chharia commented 1 month ago

Hello, thanks for this project. I am new to this field, and I have to have this same project for college. I have few questions -

1.) I am trying to run the camera calibration using the 4 images you have provided. Instead of passing the video from the camera, I passed the image directly (cause don't have the necessary equipment). I didn't use the camerathread and multibuffer since I figured they were for multithreading and shouldn't have effect on the overall calibration. However, every time I run the code, I am getting the message that no corners of the chessboard is detected. How to solve this problem ?

2.) I have watched many videos on Youtube, people trying to implement this project. In that the car, and the checkerboard is kept stationary. Don't we have to move the checkerboard pattern around and take several images inorder to do the calibration ?

3.) Why is the circled-square in the middle of the camera calibration mat ? Can't we have a mat with full checkerboard pattern ?

Thank you. I am new to this field so these questions might be basic. I appreciate any help you provide. Thanks once again.

neozhaoliang commented 1 month ago

I am trying to run the camera calibration using the 4 images you have provided. Instead of passing the video from the camera, I passed the image directly (cause don't have the necessary equipment). I didn't use the camerathread and multibuffer since I figured they were for multithreading and shouldn't have effect on the overall calibration.

Yes, the camerathread and multibuffer classes are not mandatory for calibration.

However, every time I run the code, I am getting the message that no corners of the chessboard is detected. How to solve this problem ?

Save the image to disk, check the grid parameter fits the image you are using, e.g. 6x8 or 6x6 or 8x8, and check it by reading the image only and run the calibration code.

I have watched many videos on Youtube, people trying to implement this project. In that the car, and the checkerboard is kept stationary. Don't we have to move the checkerboard pattern around and take several images inorder to do the calibration ?

You need to move the chessboard to calibrate the intrinsic parameters of the camera, but you must keep the board still to calibrate the projection matrix.

Why is the circled-square in the middle of the camera calibration mat ? Can't we have a mat with full checkerboard pattern ?

Yes you can use only square checker patterns. I added circles because I want to do some experiments about automatic calibration, but didn't have the time to do it.

Aryan-Chharia commented 1 month ago

Save the image to disk, check the grid parameter fits the image you are using, e.g. 6x8 or 6x6 or 8x8, and check it by reading the image only and run the calibration code.

I am using the front side image , you provided in the documentation, however it is only able to detect the corners of 3x3 or 3x4 grid in one chessboard only. Is it fine ? image

You need to move the chessboard to calibrate the intrinsic parameters of the camera, but you must keep the board still to calibrate the projection matrix.

To calibrate intrinsic parameters of the camera, do we need a separate checkerboard to move it. I am asking this cause there is only one calibration mat shown that is around the car.

neozhaoliang commented 1 month ago

Oops! You must use a separate checkerboard to calibrate your camera, the checker cloth is only for calibrating the projection matrix!

Aryan-Chharia commented 1 month ago

Oh !! Thanks now I got it completely why it wasn't working. Thanks again !!