@@ -10,7 +10,7 @@ namespace opencv_test { namespace {
1010
1111TEST (CV_ArucoTutorial, can_find_singlemarkersoriginal)
1212{
13- string img_path = cvtest::findDataFile (" singlemarkersoriginal.jpg" , false );
13+ string img_path = cvtest::findDataFile (" aruco/ singlemarkersoriginal.jpg" , false );
1414 Mat image = imread (img_path);
1515 aruco::ArucoDetector detector (aruco::getPredefinedDictionary (aruco::DICT_6X6_250));
1616
@@ -44,9 +44,9 @@ TEST(CV_ArucoTutorial, can_find_singlemarkersoriginal)
4444
4545TEST (CV_ArucoTutorial, can_find_gboriginal)
4646{
47- string imgPath = cvtest::findDataFile (" gboriginal.png " , false );
47+ string imgPath = cvtest::findDataFile (" aruco/ gboriginal.jpg " , false );
4848 Mat image = imread (imgPath);
49- string dictPath = cvtest::findDataFile (" tutorial_dict.yml" , false );
49+ string dictPath = cvtest::findDataFile (" aruco/ tutorial_dict.yml" , false );
5050 aruco::Dictionary dictionary;
5151
5252 FileStorage fs (dictPath, FileStorage::READ);
@@ -99,7 +99,7 @@ TEST(CV_ArucoTutorial, can_find_gboriginal)
9999
100100TEST (CV_ArucoTutorial, can_find_choriginal)
101101{
102- string imgPath = cvtest::findDataFile (" choriginal.jpg" , false );
102+ string imgPath = cvtest::findDataFile (" aruco/ choriginal.jpg" , false );
103103 Mat image = imread (imgPath);
104104 aruco::ArucoDetector detector (aruco::getPredefinedDictionary (aruco::DICT_6X6_250));
105105
@@ -138,7 +138,7 @@ TEST(CV_ArucoTutorial, can_find_choriginal)
138138
139139TEST (CV_ArucoTutorial, can_find_chocclusion)
140140{
141- string imgPath = cvtest::findDataFile (" chocclusion_original.jpg" , false );
141+ string imgPath = cvtest::findDataFile (" aruco/ chocclusion_original.jpg" , false );
142142 Mat image = imread (imgPath);
143143 aruco::ArucoDetector detector (aruco::getPredefinedDictionary (aruco::DICT_6X6_250));
144144
@@ -176,15 +176,15 @@ TEST(CV_ArucoTutorial, can_find_chocclusion)
176176
177177TEST (CV_ArucoTutorial, can_find_diamondmarkers)
178178{
179- string imgPath = cvtest::findDataFile (" diamondmarkers.png " , false );
179+ string imgPath = cvtest::findDataFile (" aruco/ diamondmarkers.jpg " , false );
180180 Mat image = imread (imgPath);
181181
182- string dictPath = cvtest::findDataFile (" tutorial_dict.yml" , false );
182+ string dictPath = cvtest::findDataFile (" aruco/ tutorial_dict.yml" , false );
183183 aruco::Dictionary dictionary;
184184 FileStorage fs (dictPath, FileStorage::READ);
185185 dictionary.aruco ::Dictionary::readDictionary (fs.root ()); // set marker from tutorial_dict.yml
186186
187- string detectorPath = cvtest::findDataFile (" detector_params.yml" , false );
187+ string detectorPath = cvtest::findDataFile (" aruco/ detector_params.yml" , false );
188188 fs = FileStorage (detectorPath, FileStorage::READ);
189189 aruco::DetectorParameters detectorParams;
190190 detectorParams.readDetectorParameters (fs.root ());
@@ -203,13 +203,14 @@ TEST(CV_ArucoTutorial, can_find_diamondmarkers)
203203
204204 detector.detectMarkers (image, corners, ids, rejected);
205205 map<int , int > counterRes;
206+
207+ ASSERT_EQ (N, ids.size ());
206208 for (size_t i = 0 ; i < N; i++)
207209 {
208210 int arucoId = ids[i];
209211 counterRes[arucoId]++;
210212 }
211213
212- ASSERT_EQ (N, ids.size ());
213214 EXPECT_EQ (counterGoldCornersIds, counterRes); // check the number of ArUco markers
214215}
215216
0 commit comments