mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
Merge branch 4.x
This commit is contained in:
@@ -285,6 +285,16 @@ public:
|
||||
const DetectorParameters &detectorParams = DetectorParameters(),
|
||||
const RefineParameters& refineParams = RefineParameters());
|
||||
|
||||
/** @brief ArucoDetector constructor for multiple dictionaries
|
||||
*
|
||||
* @param dictionaries indicates the type of markers that will be searched. Empty dictionaries will throw an error.
|
||||
* @param detectorParams marker detection parameters
|
||||
* @param refineParams marker refine detection parameters
|
||||
*/
|
||||
CV_WRAP ArucoDetector(const std::vector<Dictionary> &dictionaries,
|
||||
const DetectorParameters &detectorParams = DetectorParameters(),
|
||||
const RefineParameters& refineParams = RefineParameters());
|
||||
|
||||
/** @brief Basic marker detection
|
||||
*
|
||||
* @param image input image
|
||||
@@ -297,7 +307,7 @@ public:
|
||||
* @param rejectedImgPoints contains the imgPoints of those squares whose inner code has not a
|
||||
* correct codification. Useful for debugging purposes.
|
||||
*
|
||||
* Performs marker detection in the input image. Only markers included in the specific dictionary
|
||||
* Performs marker detection in the input image. Only markers included in the first specified dictionary
|
||||
* are searched. For each detected marker, it returns the 2D position of its corner in the image
|
||||
* and its corresponding identifier.
|
||||
* Note that this function does not perform pose estimation.
|
||||
@@ -329,6 +339,8 @@ public:
|
||||
* If camera parameters and distortion coefficients are provided, missing markers are reprojected
|
||||
* using projectPoint function. If not, missing marker projections are interpolated using global
|
||||
* homography, and all the marker corners in the board must have the same Z coordinate.
|
||||
* @note This function assumes that the board only contains markers from one dictionary, so only the
|
||||
* first configured dictionary is used. It has to match the dictionary of the board to work properly.
|
||||
*/
|
||||
CV_WRAP void refineDetectedMarkers(InputArray image, const Board &board,
|
||||
InputOutputArrayOfArrays detectedCorners,
|
||||
@@ -336,9 +348,59 @@ public:
|
||||
InputArray cameraMatrix = noArray(), InputArray distCoeffs = noArray(),
|
||||
OutputArray recoveredIdxs = noArray()) const;
|
||||
|
||||
/** @brief Basic marker detection
|
||||
*
|
||||
* @param image input image
|
||||
* @param corners vector of detected marker corners. For each marker, its four corners
|
||||
* are provided, (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers,
|
||||
* the dimensions of this array is Nx4. The order of the corners is clockwise.
|
||||
* @param ids vector of identifiers of the detected markers. The identifier is of type int
|
||||
* (e.g. std::vector<int>). For N detected markers, the size of ids is also N.
|
||||
* The identifiers have the same order than the markers in the imgPoints array.
|
||||
* @param rejectedImgPoints contains the imgPoints of those squares whose inner code has not a
|
||||
* correct codification. Useful for debugging purposes.
|
||||
* @param dictIndices vector of dictionary indices for each detected marker. Use getDictionaries() to get the
|
||||
* list of corresponding dictionaries.
|
||||
*
|
||||
* Performs marker detection in the input image. Only markers included in the specific dictionaries
|
||||
* are searched. For each detected marker, it returns the 2D position of its corner in the image
|
||||
* and its corresponding identifier.
|
||||
* Note that this function does not perform pose estimation.
|
||||
* @note The function does not correct lens distortion or takes it into account. It's recommended to undistort
|
||||
* input image with corresponding camera model, if camera parameters are known
|
||||
* @sa undistort, estimatePoseSingleMarkers, estimatePoseBoard
|
||||
*/
|
||||
CV_WRAP void detectMarkersMultiDict(InputArray image, OutputArrayOfArrays corners, OutputArray ids,
|
||||
OutputArrayOfArrays rejectedImgPoints = noArray(), OutputArray dictIndices = noArray()) const;
|
||||
|
||||
/** @brief Returns first dictionary from internal list used for marker detection.
|
||||
*
|
||||
* @return The first dictionary from the configured ArucoDetector.
|
||||
*/
|
||||
CV_WRAP const Dictionary& getDictionary() const;
|
||||
|
||||
/** @brief Sets and replaces the first dictionary in internal list to be used for marker detection.
|
||||
*
|
||||
* @param dictionary The new dictionary that will replace the first dictionary in the internal list.
|
||||
*/
|
||||
CV_WRAP void setDictionary(const Dictionary& dictionary);
|
||||
|
||||
/** @brief Returns all dictionaries currently used for marker detection as a vector.
|
||||
*
|
||||
* @return A std::vector<Dictionary> containing all dictionaries used by the ArucoDetector.
|
||||
*/
|
||||
CV_WRAP std::vector<Dictionary> getDictionaries() const;
|
||||
|
||||
/** @brief Sets the entire collection of dictionaries to be used for marker detection, replacing any existing dictionaries.
|
||||
*
|
||||
* @param dictionaries A std::vector<Dictionary> containing the new set of dictionaries to be used.
|
||||
*
|
||||
* Configures the ArucoDetector to use the provided vector of dictionaries for marker detection.
|
||||
* This method replaces any dictionaries that were previously set.
|
||||
* @note Setting an empty vector of dictionaries will throw an error.
|
||||
*/
|
||||
CV_WRAP void setDictionaries(const std::vector<Dictionary>& dictionaries);
|
||||
|
||||
CV_WRAP const DetectorParameters& getDetectorParameters() const;
|
||||
CV_WRAP void setDetectorParameters(const DetectorParameters& detectorParameters);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user