mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Merge pull request #29077 from vrabaud:throw
Homogeneize some calib/3d behavior #29077 - use CV_Check to validate input sizes (thus throwing for invalid inputs) - return bool to validate a function result This fixes #22746 ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [x] There is a reference to the original bug report and related work - [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [x] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
@@ -354,14 +354,16 @@ No image processing is done to improve to find the checkerboard. This has the ef
|
||||
execution of the function but could lead to not recognizing the checkerboard if the image
|
||||
is not previously binarized in the appropriate manner.
|
||||
|
||||
@return True if all of the corners are found and placed in a certain order (row by row,
|
||||
left to right in every row). Otherwise, if the function fails to find all the corners or reorder them,
|
||||
it returns false.
|
||||
|
||||
The function attempts to determine whether the input image is a view of the chessboard pattern and
|
||||
locate the internal chessboard corners. The function returns a non-zero value if all of the corners
|
||||
are found and they are placed in a certain order (row by row, left to right in every row).
|
||||
Otherwise, if the function fails to find all the corners or reorder them, it returns 0. For example,
|
||||
a regular chessboard has 8 x 8 squares and 7 x 7 internal corners, that is, points where the black
|
||||
squares touch each other. The detected coordinates are approximate, and to determine their positions
|
||||
more accurately, the function calls #cornerSubPix. You also may use the function #cornerSubPix with
|
||||
different parameters if returned coordinates are not accurate enough.
|
||||
locate the internal chessboard corners. For example, a regular chessboard has 8 x 8 squares and
|
||||
7 x 7 internal corners, that is, points where the black squares touch each other. The detected
|
||||
coordinates are approximate, and to determine their positions more accurately, the function
|
||||
calls #cornerSubPix. You also may use the function #cornerSubPix with different parameters if
|
||||
returned coordinates are not accurate enough.
|
||||
|
||||
Sample usage of detecting and drawing chessboard corners: :
|
||||
@code
|
||||
@@ -392,9 +394,12 @@ to create the desired checkerboard pattern.
|
||||
CV_EXPORTS_W bool findChessboardCorners( InputArray image, Size patternSize, OutputArray corners,
|
||||
int flags = CALIB_CB_ADAPTIVE_THRESH + CALIB_CB_NORMALIZE_IMAGE );
|
||||
|
||||
/*
|
||||
Checks whether the image contains chessboard of the specific size or not.
|
||||
If yes, nonzero value is returned.
|
||||
/** @brief Checks whether the image contains chessboard of the specific size or not.
|
||||
|
||||
@param img Source chessboard view.
|
||||
@param size Size of the chessboard.
|
||||
|
||||
@return Whether a chessboard was found.
|
||||
*/
|
||||
CV_EXPORTS_W bool checkChessboard(InputArray img, Size size);
|
||||
|
||||
@@ -552,10 +557,12 @@ perspective distortions but much more sensitive to background clutter.
|
||||
If `blobDetector` is NULL then `image` represents Point2f array of candidates.
|
||||
@param parameters struct for finding circles in a grid pattern.
|
||||
|
||||
return True if all of the centers have been found and they have been placed in a certain order
|
||||
(row by row, left to right in every row). Otherwise, if the function fails to find all the corners
|
||||
or reorder them, it returns false.
|
||||
|
||||
The function attempts to determine whether the input image contains a grid of circles. If it is, the
|
||||
function locates centers of the circles. The function returns a non-zero value if all of the centers
|
||||
have been found and they have been placed in a certain order (row by row, left to right in every
|
||||
row). Otherwise, if the function fails to find all the corners or reorder them, it returns 0.
|
||||
function locates centers of the circles.
|
||||
|
||||
Sample usage of detecting and drawing the centers of circles: :
|
||||
@code
|
||||
|
||||
Reference in New Issue
Block a user