mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-18 17:24:28 +08:00
move april module
create aruco_utils.hpp move Board, GridBoard, CharucoBoard to board.hpp/board.cpp refactoring _getSingleMarkerObjectPoints() refactoring _extractBits() refactoring _findMarkerContours() fix _copyVector2Output() in detectMarkers() move testCharucoCornersCollinear() to board.hpp/board.cpp move poseEstimate()/calibAruco() to aruco_calib_pose.hpp reduce include files move detectMarkers() to class ArucoDetector move refineDetectedMarkers() to class ArucoDetector add C API wrapper to detectMarkers(), refineDetectedMarkers() update tests and samples to class API add py tests: test_aruco_detector, test_aruco_detector_refine refactoring, fix docs add java tests: testArucoIssue3133, testArucoDetector add readWriteParameter(), update readParameter() implemented cv::Algorithm - read/write, added read/write to RefineParameters, added write to DetectorParameters merge PatternPos/EstimateParameters after rebase remove empty docstring for private function fixes fixes license
This commit is contained in:
@@ -39,7 +39,8 @@ the use of this software, even if advised of the possibility of such damage.
|
||||
|
||||
#include <opencv2/highgui.hpp>
|
||||
#include <opencv2/calib3d.hpp>
|
||||
#include <opencv2/aruco.hpp>
|
||||
#include <opencv2/aruco_detector.hpp>
|
||||
#include <opencv2/aruco/aruco_calib_pose.hpp>
|
||||
#include <opencv2/imgproc.hpp>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
@@ -162,6 +163,8 @@ int main(int argc, char *argv[]) {
|
||||
vector< vector< int > > allIds;
|
||||
Size imgSize;
|
||||
|
||||
aruco::ArucoDetector detector(dictionary, detectorParams);
|
||||
|
||||
while(inputVideo.grab()) {
|
||||
Mat image, imageCopy;
|
||||
inputVideo.retrieve(image);
|
||||
@@ -170,10 +173,10 @@ int main(int argc, char *argv[]) {
|
||||
vector< vector< Point2f > > corners, rejected;
|
||||
|
||||
// detect markers
|
||||
aruco::detectMarkers(image, dictionary, corners, ids, detectorParams, rejected);
|
||||
detector.detectMarkers(image, corners, ids, rejected);
|
||||
|
||||
// refind strategy to detect more markers
|
||||
if(refindStrategy) aruco::refineDetectedMarkers(image, board, corners, ids, rejected);
|
||||
if(refindStrategy) detector.refineDetectedMarkers(image, board, corners, ids, rejected);
|
||||
|
||||
// draw results
|
||||
image.copyTo(imageCopy);
|
||||
|
Reference in New Issue
Block a user