- Prepare checker board
- Checkerboard squares must be of equal size, measure the distance between each square
- Ensure that the checkboard is perfectly flat throughout the process. A solid backing is required if it's a printed paper, so that it doesn't bend when it is being moved around.
- Move the checkerboard to cover the entire video field of view, move it over all pixels
- All the checkerboard intersection points need to be in the image frame to be counted as a proper detection.
- Focus on covering all the corners and side which are more difficult
-
The goal is to have the checkerboard cover all the pixels in the video frame image with all the different position, each color shows one set of checkerboard:
-
Example Video:
Example Checkerboard Video
example_results/Vid_20131219_105014_small_180p_s10_raw
- Create directory called
CameraCalibration
on your desktop - Put all the videos you want to analyse in that director
- Install Julia 1.7.2 (https://julialang.org/downloads/oldreleases/): Windows 64bits, MacOS M1, MacOS Intel
- start julia
- Install this CameraCalibration package:
using Pkg
Pkg.add(url="https://github.com/AbelHo/CameraCalibration.jl")
using CameraCalibration
- This command will automatically search for the directory(Desktop/CameraCalibration) and process all the videos in it
calibrate_video_checkerboard()
- If the checkerboard rows and columns number is different than the above example, change the following [4,6] to [row,column]
calibrate_video_checkerboard([4,6]);
-
After processing the video it will output the following to show you how well you have covered the checkerboard over the entire image pixel:
-
This will show you the selected good images and the checkerboard coverage:
The calibration will select the best images required as shown below and show a yellow dot on the detected checkerboard intersection
example_results/Vid_20131219_105014_small_180p_s10
- [4 rows, 6 columns]
- inpput video filepath
- results directory
; - skipnumber of image frame in the video
calibrate_video_checkerboard([4,6],"Vid_20131219_105014_small_180p.mp4","/Users/USERNAME/Desktop/CameraCalibration/results"; numskipframe=10);
without skipping any video frame
calibrate_video_checkerboard([4,6],"Vid_20131219_105014_small_180p.mp4");
- without skipping any video frame
- calibrate all video files in directory username/Desktop/CameraCalibration
calibrate_video_checkerboard([4,6]);