[opencv] 79/251: mser: add a couple of new regression tests
Nobuhiro Iwamatsu
iwamatsu at moszumanska.debian.org
Sun Aug 27 23:27:28 UTC 2017
This is an automated email from the git hooks/post-receive script.
iwamatsu pushed a commit to annotated tag 3.3.0
in repository opencv.
commit 25af7439027b0d59b98ce7f814f733d4937c5706
Author: Vladislav Sovrasov <sovrasov.vlad at gmail.com>
Date: Mon Jul 10 17:11:04 2017 +0300
mser: add a couple of new regression tests
---
modules/features2d/test/test_mser.cpp | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/modules/features2d/test/test_mser.cpp b/modules/features2d/test/test_mser.cpp
index a52c3c3..a92e628 100644
--- a/modules/features2d/test/test_mser.cpp
+++ b/modules/features2d/test/test_mser.cpp
@@ -159,3 +159,26 @@ TEST(Features2d_MSER, cases)
ASSERT_GE(maxRegs, nmsers);
}
}
+
+TEST(Features2d_MSER, history_update_regression)
+{
+ String dataPath = cvtest::TS::ptr()->get_data_path() + "mser/";
+ vector<Mat> tstImages;
+ tstImages.push_back(imread(dataPath + "mser_test.png", IMREAD_GRAYSCALE));
+ tstImages.push_back(imread(dataPath + "mser_test2.png", IMREAD_GRAYSCALE));
+
+ for(size_t j = 0; j < tstImages.size(); j++)
+ {
+ size_t previous_size = 0;
+ for(int minArea = 100; minArea > 10; minArea--)
+ {
+ Ptr<MSER> mser = MSER::create(1, minArea, (int)(tstImages[j].cols * tstImages[j].rows * 0.2));
+ mser->setPass2Only(true);
+ vector<vector<Point> > mserContours;
+ vector<Rect> boxRects;
+ mser->detectRegions(tstImages[j], mserContours, boxRects);
+ ASSERT_LE(previous_size, mserContours.size());
+ previous_size = mserContours.size();
+ }
+ }
+}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opencv.git
More information about the debian-science-commits
mailing list