[][src]Function opencv::calib3d::estimate_chessboard_sharpness

pub fn estimate_chessboard_sharpness(
    image: &dyn ToInputArray,
    pattern_size: Size,
    corners: &dyn ToInputArray,
    rise_distance: f32,
    vertical: bool,
    sharpness: &mut dyn ToOutputArray
) -> Result<Scalar>

Estimates the sharpness of a detected chessboard.

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.

Parameters

  • image: Gray image used to find chessboard corners
  • patternSize: Size of a found chessboard pattern
  • corners: Corners found by findChessboardCorners(SB)
  • rise_distance: Rise distance 0.8 means 10% ... 90% of the final signal strength
  • vertical: By default edge responses for horizontal lines are calculated
  • sharpness: Optional output array with a sharpness value for calculated edge responses (see description)

The optional sharpness array is of type CV_32FC1 and has for each calculated profile one row with the following five entries:

  • 0 = x coordinate of the underlying edge in the image
  • 1 = y coordinate of the underlying edge in the image
  • 2 = width of the transition area (sharpness)
  • 3 = signal strength in the black cell (min brightness)
  • 4 = signal strength in the white cell (max brightness)

Returns

Scalar(average sharpness, average min brightness, average max brightness,0)

C++ default parameters

  • rise_distance: 0.8F
  • vertical: false
  • sharpness: noArray()