mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
features2d: improve detector parameter validation
This commit is contained in:
@@ -135,4 +135,14 @@ void CV_AgastTest::run( int )
|
||||
|
||||
TEST(Features2d_AGAST, regression) { CV_AgastTest test; test.safe_run(); }
|
||||
|
||||
TEST(Features2d_AGAST, invalidDetectorType)
|
||||
{
|
||||
Mat img = Mat::zeros(16, 16, CV_8UC1);
|
||||
vector<KeyPoint> keypoints;
|
||||
|
||||
EXPECT_THROW(AGAST(img, keypoints, 10, true,
|
||||
static_cast<AgastFeatureDetector::DetectorType>(-1)),
|
||||
cv::Exception);
|
||||
}
|
||||
|
||||
}} // namespace
|
||||
|
||||
Reference in New Issue
Block a user