Skip to content
This repository was archived by the owner on Jan 16, 2024. It is now read-only.

Commit 2c702f5

Browse files
committed
Import opencv 4.4.0
1 parent 5a16cc3 commit 2c702f5

File tree

437 files changed

+39779
-18811
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

437 files changed

+39779
-18811
lines changed

include/opencv4/opencv2/aruco.hpp

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ enum CornerRefineMethod{
9999
* - maxMarkerPerimeterRate: determine maximum perimeter for marker contour to be detected. This
100100
* is defined as a rate respect to the maximum dimension of the input image (default 4.0).
101101
* - polygonalApproxAccuracyRate: minimum accuracy during the polygonal approximation process to
102-
* determine which contours are squares.
102+
* determine which contours are squares. (default 0.03)
103103
* - minCornerDistanceRate: minimum distance between corners for detected markers relative to its
104104
* perimeter (default 0.05)
105105
* - minDistanceToBorder: minimum distance of any corner to the image border for detected markers
@@ -109,18 +109,18 @@ enum CornerRefineMethod{
109109
* of the two markers (default 0.05).
110110
* - cornerRefinementMethod: corner refinement method. (CORNER_REFINE_NONE, no refinement.
111111
* CORNER_REFINE_SUBPIX, do subpixel refinement. CORNER_REFINE_CONTOUR use contour-Points,
112-
* CORNER_REFINE_APRILTAG use the AprilTag2 approach)
112+
* CORNER_REFINE_APRILTAG use the AprilTag2 approach). (default CORNER_REFINE_NONE)
113113
* - cornerRefinementWinSize: window size for the corner refinement process (in pixels) (default 5).
114114
* - cornerRefinementMaxIterations: maximum number of iterations for stop criteria of the corner
115115
* refinement process (default 30).
116116
* - cornerRefinementMinAccuracy: minimum error for the stop cristeria of the corner refinement
117117
* process (default: 0.1)
118118
* - markerBorderBits: number of bits of the marker border, i.e. marker border width (default 1).
119-
* - perpectiveRemovePixelPerCell: number of bits (per dimension) for each cell of the marker
120-
* when removing the perspective (default 8).
119+
* - perspectiveRemovePixelPerCell: number of bits (per dimension) for each cell of the marker
120+
* when removing the perspective (default 4).
121121
* - perspectiveRemoveIgnoredMarginPerCell: width of the margin of pixels on each cell not
122122
* considered for the determination of the cell bit. Represents the rate respect to the total
123-
* size of the cell, i.e. perpectiveRemovePixelPerCell (default 0.13)
123+
* size of the cell, i.e. perspectiveRemovePixelPerCell (default 0.13)
124124
* - maxErroneousBitsInBorderRate: maximum number of accepted erroneous bits in the border (i.e.
125125
* number of allowed white bits in the border). Represented as a rate respect to the total
126126
* number of bits per marker (default 0.35).
@@ -129,21 +129,23 @@ enum CornerRefineMethod{
129129
* than 128 or not) (default 5.0)
130130
* - errorCorrectionRate error correction rate respect to the maximun error correction capability
131131
* for each dictionary. (default 0.6).
132-
* - aprilTagMinClusterPixels: reject quads containing too few pixels.
133-
* - aprilTagMaxNmaxima: how many corner candidates to consider when segmenting a group of pixels into a quad.
132+
* - aprilTagMinClusterPixels: reject quads containing too few pixels. (default 5)
133+
* - aprilTagMaxNmaxima: how many corner candidates to consider when segmenting a group of pixels into a quad. (default 10)
134134
* - aprilTagCriticalRad: Reject quads where pairs of edges have angles that are close to straight or close to
135-
* 180 degrees. Zero means that no quads are rejected. (In radians).
135+
* 180 degrees. Zero means that no quads are rejected. (In radians) (default 10*PI/180)
136136
* - aprilTagMaxLineFitMse: When fitting lines to the contours, what is the maximum mean squared error
137137
* allowed? This is useful in rejecting contours that are far from being quad shaped; rejecting
138-
* these quads "early" saves expensive decoding processing.
138+
* these quads "early" saves expensive decoding processing. (default 10.0)
139139
* - aprilTagMinWhiteBlackDiff: When we build our model of black & white pixels, we add an extra check that
140-
* the white model must be (overall) brighter than the black model. How much brighter? (in pixel values, [0,255]).
141-
* - aprilTagDeglitch: should the thresholded image be deglitched? Only useful for very noisy images
140+
* the white model must be (overall) brighter than the black model. How much brighter? (in pixel values, [0,255]). (default 5)
141+
* - aprilTagDeglitch: should the thresholded image be deglitched? Only useful for very noisy images. (default 0)
142142
* - aprilTagQuadDecimate: Detection of quads can be done on a lower-resolution image, improving speed at a
143143
* cost of pose accuracy and a slight decrease in detection rate. Decoding the binary payload is still
144-
* done at full resolution.
144+
* done at full resolution. (default 0.0)
145145
* - aprilTagQuadSigma: What Gaussian blur should be applied to the segmented image (used for quad detection?)
146-
* Parameter is the standard deviation in pixels. Very noisy images benefit from non-zero values (e.g. 0.8).
146+
* Parameter is the standard deviation in pixels. Very noisy images benefit from non-zero values (e.g. 0.8). (default 0.0)
147+
* - detectInvertedMarker: to check if there is a white marker. In order to generate a "white" marker just
148+
* invert a normal marker by using a tilde, ~markerImage. (default false)
147149
*/
148150
struct CV_EXPORTS_W DetectorParameters {
149151

@@ -183,6 +185,9 @@ struct CV_EXPORTS_W DetectorParameters {
183185
CV_PROP_RW float aprilTagMaxLineFitMse;
184186
CV_PROP_RW int aprilTagMinWhiteBlackDiff;
185187
CV_PROP_RW int aprilTagDeglitch;
188+
189+
// to detect white (inverted) markers
190+
CV_PROP_RW bool detectInvertedMarker;
186191
};
187192

188193

@@ -257,7 +262,7 @@ CV_EXPORTS_W void estimatePoseSingleMarkers(InputArrayOfArrays corners, float ma
257262
/**
258263
* @brief Board of markers
259264
*
260-
* A board is a set of markers in the 3D space with a common cordinate system.
265+
* A board is a set of markers in the 3D space with a common coordinate system.
261266
* The common form of a board of marker is a planar (2D) board, however any 3D layout can be used.
262267
* A Board object is composed by:
263268
* - The object points of the marker corners, i.e. their coordinates respect to the board system.
@@ -268,7 +273,7 @@ class CV_EXPORTS_W Board {
268273

269274
public:
270275
/**
271-
* @brief Provide way to create Board by passing nessesary data. Specially needed in Python.
276+
* @brief Provide way to create Board by passing necessary data. Specially needed in Python.
272277
*
273278
* @param objPoints array of object points of all the marker corners in the board
274279
* @param dictionary the dictionary of markers employed for this board
@@ -292,7 +297,7 @@ class CV_EXPORTS_W Board {
292297

293298
/**
294299
* @brief Planar board with grid arrangement of markers
295-
* More common type of board. All markers are placed in the same plane in a grid arrangment.
300+
* More common type of board. All markers are placed in the same plane in a grid arrangement.
296301
* The board can be drawn using drawPlanarBoard() function (@sa drawPlanarBoard)
297302
*/
298303
class CV_EXPORTS_W GridBoard : public Board {
@@ -349,7 +354,7 @@ class CV_EXPORTS_W GridBoard : public Board {
349354
// number of markers in X and Y directions
350355
int _markersX, _markersY;
351356

352-
// marker side lenght (normally in meters)
357+
// marker side length (normally in meters)
353358
float _markerLength;
354359

355360
// separation between markers in the grid
@@ -387,8 +392,8 @@ class CV_EXPORTS_W GridBoard : public Board {
387392
* Note that returning a 0 means the pose has not been estimated.
388393
*/
389394
CV_EXPORTS_W int estimatePoseBoard(InputArrayOfArrays corners, InputArray ids, const Ptr<Board> &board,
390-
InputArray cameraMatrix, InputArray distCoeffs, OutputArray rvec,
391-
OutputArray tvec, bool useExtrinsicGuess = false);
395+
InputArray cameraMatrix, InputArray distCoeffs, InputOutputArray rvec,
396+
InputOutputArray tvec, bool useExtrinsicGuess = false);
392397

393398

394399

@@ -471,6 +476,8 @@ CV_EXPORTS_W void drawDetectedMarkers(InputOutputArray image, InputArrayOfArrays
471476
*
472477
* Given the pose estimation of a marker or board, this function draws the axis of the world
473478
* coordinate system, i.e. the system centered on the marker/board. Useful for debugging purposes.
479+
*
480+
* @deprecated use cv::drawFrameAxes
474481
*/
475482
CV_EXPORTS_W void drawAxis(InputOutputArray image, InputArray cameraMatrix, InputArray distCoeffs,
476483
InputArray rvec, InputArray tvec, float length);

include/opencv4/opencv2/aruco/charuco.hpp

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class CV_EXPORTS_W CharucoBoard : public Board {
124124
// size of chessboard squares side (normally in meters)
125125
float _squareLength;
126126

127-
// marker side lenght (normally in meters)
127+
// marker side length (normally in meters)
128128
float _markerLength;
129129
};
130130

@@ -184,8 +184,8 @@ CV_EXPORTS_W int interpolateCornersCharuco(InputArrayOfArrays markerCorners, Inp
184184
*/
185185
CV_EXPORTS_W bool estimatePoseCharucoBoard(InputArray charucoCorners, InputArray charucoIds,
186186
const Ptr<CharucoBoard> &board, InputArray cameraMatrix,
187-
InputArray distCoeffs, OutputArray rvec, OutputArray tvec,
188-
bool useExtrinsicGuess = false);
187+
InputArray distCoeffs, InputOutputArray rvec,
188+
InputOutputArray tvec, bool useExtrinsicGuess = false);
189189

190190

191191

@@ -334,7 +334,18 @@ CV_EXPORTS void drawCharucoDiamond(const Ptr<Dictionary> &dictionary, Vec4i ids,
334334
int borderBits = 1);
335335

336336

337-
337+
/**
338+
* @brief test whether the ChArUco markers are collinear
339+
*
340+
* @param _board layout of ChArUco board.
341+
* @param _charucoIds list of identifiers for each corner in charucoCorners per frame.
342+
* @return bool value, 1 (true) if detected corners form a line, 0 (false) if they do not.
343+
solvePnP, calibration functions will fail if the corners are collinear (true).
344+
*
345+
* The number of ids in charucoIDs should be <= the number of chessboard corners in the board. This functions checks whether the charuco corners are on a straight line (returns true, if so), or not (false). Axis parallel, as well as diagonal and other straight lines detected. Degenerate cases: for number of charucoIDs <= 2, the function returns true.
346+
*/
347+
CV_EXPORTS_W bool testCharucoCornersCollinear(const Ptr<CharucoBoard> &_board,
348+
InputArray _charucoIds);
338349

339350
//! @}
340351
}

include/opencv4/opencv2/bioinspired/retina.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,13 +438,13 @@ class CV_EXPORTS_W Retina : public Algorithm {
438438
@param reductionFactor only usefull if param useRetinaLogSampling=true, specifies the reduction
439439
factor of the output frame (as the center (fovea) is high resolution and corners can be
440440
underscaled, then a reduction of the output is allowed without precision leak
441-
@param samplingStrenght only usefull if param useRetinaLogSampling=true, specifies the strenght of
441+
@param samplingStrength only usefull if param useRetinaLogSampling=true, specifies the strength of
442442
the log scale that is applied
443443
*/
444444
CV_WRAP static Ptr<Retina> create(Size inputSize, const bool colorMode,
445445
int colorSamplingMethod=RETINA_COLOR_BAYER,
446446
const bool useRetinaLogSampling=false,
447-
const float reductionFactor=1.0f, const float samplingStrenght=10.0f);
447+
const float reductionFactor=1.0f, const float samplingStrength=10.0f);
448448
};
449449

450450
//! @}

include/opencv4/opencv2/bioinspired/transientareassegmentationmodule.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ class CV_EXPORTS_W TransientAreasSegmentationModule: public Algorithm
180180
CV_WRAP virtual void run(InputArray inputToSegment, const int channelIndex=0)=0;
181181

182182
/** @brief access function
183-
@return the last segmentation result: a boolean picture which is resampled between 0 and 255 for a display purpose
184-
*/
183+
return the last segmentation result: a boolean picture which is resampled between 0 and 255 for a display purpose
184+
*/
185185
CV_WRAP virtual void getSegmentationPicture(OutputArray transientAreas)=0;
186186

187187
/** @brief cleans all the buffers of the instance

0 commit comments

Comments
 (0)