calib3d: add estimateChessboardSharpness
authorAlexander Duda <Alexander.Duda@me.com>
Thu, 20 Feb 2020 15:10:27 +0000 (16:10 +0100)
committerAlexander Duda <Alexander.Duda@me.com>
Mon, 9 Mar 2020 07:58:18 +0000 (08:58 +0100)
commit44560c3e50516e4ef0116b4dca1dab61c3a36d3a
tree2d138bffd3821f33eef4e3891a1dd4e66f077fa6
parenta41cbbdc99906af81a4c26b78a3f7c7f1b301e17
calib3d: add estimateChessboardSharpness

Image sharpness, as well as brightness, are a critical parameter for
accuracte camera calibration. For accessing these parameters for
filtering out problematic calibraiton images, this method calculates
edge profiles by traveling from black to white chessboard cell centers.
Based on this, the number of pixels is calculated required to transit
from black to white. This width of the transition area is a good
indication of how sharp the chessboard is imaged and should be below
~3.0 pixels.

Based on this also motion blur can be detectd by comparing sharpness in
vertical and horizontal direction. All unsharp images should be excluded
from calibration as they will corrupt the calibration result. The same
is true for overexposued images due to a none-linear sensor response.
This can be detected by looking at the average cell brightness of the
detected chessboard.
modules/calib3d/include/opencv2/calib3d.hpp
modules/calib3d/src/chessboard.cpp
modules/calib3d/test/test_chesscorners.cpp