Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
06a13d9b
Commit
06a13d9b
authored
Oct 02, 2012
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replaced jpegs with png's. Accuracy tests pass; performance tests were not tried yet
parent
d40a2c28
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
66 additions
and
66 deletions
+66
-66
test_cornerssubpix.cpp
modules/calib3d/test/test_cornerssubpix.cpp
+2
-2
perf_fast.cpp
modules/features2d/perf/perf_fast.cpp
+1
-1
perf_orb.cpp
modules/features2d/perf/perf_orb.cpp
+1
-1
test_brisk.cpp
modules/features2d/test/test_brisk.cpp
+2
-2
test_fast.cpp
modules/features2d/test/test_fast.cpp
+2
-2
test_orb.cpp
modules/features2d/test/test_orb.cpp
+1
-1
perf_calib3d.cpp
modules/gpu/perf/perf_calib3d.cpp
+1
-1
perf_features2d.cpp
modules/gpu/perf/perf_features2d.cpp
+3
-3
perf_imgproc.cpp
modules/gpu/perf/perf_imgproc.cpp
+1
-1
perf_video.cpp
modules/gpu/perf/perf_video.cpp
+1
-1
test_imgproc.cpp
modules/gpu/test/test_imgproc.cpp
+4
-4
test_drawing.cpp
modules/highgui/test/test_drawing.cpp
+1
-1
test_video_io.cpp
modules/highgui/test/test_video_io.cpp
+2
-2
perf_canny.cpp
modules/imgproc/perf/perf_canny.cpp
+1
-1
perf_cornerEigenValsAndVecs.cpp
modules/imgproc/perf/perf_cornerEigenValsAndVecs.cpp
+1
-1
perf_cornerHarris.cpp
modules/imgproc/perf/perf_cornerHarris.cpp
+1
-1
perf_goodFeaturesToTrack.cpp
modules/imgproc/perf/perf_goodFeaturesToTrack.cpp
+1
-1
perf_houghLines.cpp
modules/imgproc/perf/perf_houghLines.cpp
+1
-1
perf_warp.cpp
modules/imgproc/perf/perf_warp.cpp
+2
-2
test_grabcut.cpp
modules/imgproc/test/test_grabcut.cpp
+1
-1
test_watershed.cpp
modules/imgproc/test/test_watershed.cpp
+1
-1
oneway.cpp
modules/legacy/src/oneway.cpp
+1
-1
perf_surf.cpp
modules/nonfree/perf/perf_surf.cpp
+1
-1
perf_cascadeclassifier.cpp
modules/objdetect/perf/perf_cascadeclassifier.cpp
+11
-11
test_latentsvmdetector.cpp
modules/objdetect/test/test_latentsvmdetector.cpp
+6
-6
test_inpaint.cpp
modules/photo/test/test_inpaint.cpp
+1
-1
perf_stich.cpp
modules/stitching/perf/perf_stich.cpp
+9
-9
test_blenders.cpp
modules/stitching/test/test_blenders.cpp
+2
-2
test_matchers.cpp
modules/stitching/test/test_matchers.cpp
+1
-1
perf_optflowpyrlk.cpp
modules/video/perf/perf_optflowpyrlk.cpp
+3
-3
No files found.
modules/calib3d/test/test_cornerssubpix.cpp
View file @
06a13d9b
...
@@ -156,7 +156,7 @@ void CV_ChessboardSubpixelTest::run( int )
...
@@ -156,7 +156,7 @@ void CV_ChessboardSubpixelTest::run( int )
if
(
!
result
)
if
(
!
result
)
{
{
#if 0
#if 0
ts->printf(cvtest::TS::LOG, "Warning: chessboard was not detected! Writing image to test.
jp
g\n");
ts->printf(cvtest::TS::LOG, "Warning: chessboard was not detected! Writing image to test.
pn
g\n");
ts->printf(cvtest::TS::LOG, "Size = %d, %d\n", pattern_size.width, pattern_size.height);
ts->printf(cvtest::TS::LOG, "Size = %d, %d\n", pattern_size.width, pattern_size.height);
ts->printf(cvtest::TS::LOG, "Intrinsic params: fx = %f, fy = %f, cx = %f, cy = %f\n",
ts->printf(cvtest::TS::LOG, "Intrinsic params: fx = %f, fy = %f, cx = %f, cy = %f\n",
intrinsic_matrix_.at<double>(0, 0), intrinsic_matrix_.at<double>(1, 1),
intrinsic_matrix_.at<double>(0, 0), intrinsic_matrix_.at<double>(1, 1),
...
@@ -166,7 +166,7 @@ void CV_ChessboardSubpixelTest::run( int )
...
@@ -166,7 +166,7 @@ void CV_ChessboardSubpixelTest::run( int )
distortion_coeffs_.at<double>(0, 2), distortion_coeffs_.at<double>(0, 3),
distortion_coeffs_.at<double>(0, 2), distortion_coeffs_.at<double>(0, 3),
distortion_coeffs_.at<double>(0, 4));
distortion_coeffs_.at<double>(0, 4));
imwrite("test.
jp
g", chessboard_image);
imwrite("test.
pn
g", chessboard_image);
#endif
#endif
continue
;
continue
;
}
}
...
...
modules/features2d/perf/perf_fast.cpp
View file @
06a13d9b
...
@@ -10,7 +10,7 @@ typedef perf::TestBaseWithParam<std::string> fast;
...
@@ -10,7 +10,7 @@ typedef perf::TestBaseWithParam<std::string> fast;
#define FAST_IMAGES \
#define FAST_IMAGES \
"cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png",\
"cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png",\
"stitching/a3.
jp
g"
"stitching/a3.
pn
g"
PERF_TEST_P
(
fast
,
detectForORB
,
testing
::
Values
(
FAST_IMAGES
))
PERF_TEST_P
(
fast
,
detectForORB
,
testing
::
Values
(
FAST_IMAGES
))
{
{
...
...
modules/features2d/perf/perf_orb.cpp
View file @
06a13d9b
...
@@ -10,7 +10,7 @@ typedef perf::TestBaseWithParam<std::string> orb;
...
@@ -10,7 +10,7 @@ typedef perf::TestBaseWithParam<std::string> orb;
#define ORB_IMAGES \
#define ORB_IMAGES \
"cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png",\
"cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png",\
"stitching/a3.
jp
g"
"stitching/a3.
pn
g"
PERF_TEST_P
(
orb
,
detect
,
testing
::
Values
(
ORB_IMAGES
))
PERF_TEST_P
(
orb
,
detect
,
testing
::
Values
(
ORB_IMAGES
))
{
{
...
...
modules/features2d/test/test_brisk.cpp
View file @
06a13d9b
...
@@ -58,8 +58,8 @@ CV_BRISKTest::~CV_BRISKTest() {}
...
@@ -58,8 +58,8 @@ CV_BRISKTest::~CV_BRISKTest() {}
void
CV_BRISKTest
::
run
(
int
)
void
CV_BRISKTest
::
run
(
int
)
{
{
Mat
image1
=
imread
(
string
(
ts
->
get_data_path
())
+
"inpaint/orig.
jp
g"
);
Mat
image1
=
imread
(
string
(
ts
->
get_data_path
())
+
"inpaint/orig.
pn
g"
);
Mat
image2
=
imread
(
string
(
ts
->
get_data_path
())
+
"cameracalibration/chess9.
jp
g"
);
Mat
image2
=
imread
(
string
(
ts
->
get_data_path
())
+
"cameracalibration/chess9.
pn
g"
);
if
(
image1
.
empty
()
||
image2
.
empty
())
if
(
image1
.
empty
()
||
image2
.
empty
())
{
{
...
...
modules/features2d/test/test_fast.cpp
View file @
06a13d9b
...
@@ -59,8 +59,8 @@ CV_FastTest::~CV_FastTest() {}
...
@@ -59,8 +59,8 @@ CV_FastTest::~CV_FastTest() {}
void
CV_FastTest
::
run
(
int
)
void
CV_FastTest
::
run
(
int
)
{
{
for
(
int
type
=
0
;
type
<=
2
;
++
type
)
{
for
(
int
type
=
0
;
type
<=
2
;
++
type
)
{
Mat
image1
=
imread
(
string
(
ts
->
get_data_path
())
+
"inpaint/orig.
jp
g"
);
Mat
image1
=
imread
(
string
(
ts
->
get_data_path
())
+
"inpaint/orig.
pn
g"
);
Mat
image2
=
imread
(
string
(
ts
->
get_data_path
())
+
"cameracalibration/chess9.
jp
g"
);
Mat
image2
=
imread
(
string
(
ts
->
get_data_path
())
+
"cameracalibration/chess9.
pn
g"
);
string
xml
=
string
(
ts
->
get_data_path
())
+
format
(
"fast/result%d.xml"
,
type
);
string
xml
=
string
(
ts
->
get_data_path
())
+
format
(
"fast/result%d.xml"
,
type
);
if
(
image1
.
empty
()
||
image2
.
empty
())
if
(
image1
.
empty
()
||
image2
.
empty
())
...
...
modules/features2d/test/test_orb.cpp
View file @
06a13d9b
...
@@ -49,7 +49,7 @@ TEST(Features2D_ORB, _1996)
...
@@ -49,7 +49,7 @@ TEST(Features2D_ORB, _1996)
Ptr
<
FeatureDetector
>
fd
=
FeatureDetector
::
create
(
"ORB"
);
Ptr
<
FeatureDetector
>
fd
=
FeatureDetector
::
create
(
"ORB"
);
Ptr
<
DescriptorExtractor
>
de
=
DescriptorExtractor
::
create
(
"ORB"
);
Ptr
<
DescriptorExtractor
>
de
=
DescriptorExtractor
::
create
(
"ORB"
);
Mat
image
=
imread
(
string
(
cvtest
::
TS
::
ptr
()
->
get_data_path
())
+
"shared/lena.
jp
g"
);
Mat
image
=
imread
(
string
(
cvtest
::
TS
::
ptr
()
->
get_data_path
())
+
"shared/lena.
pn
g"
);
ASSERT_FALSE
(
image
.
empty
());
ASSERT_FALSE
(
image
.
empty
());
Mat
roi
(
image
.
size
(),
CV_8UC1
,
Scalar
(
0
));
Mat
roi
(
image
.
size
(),
CV_8UC1
,
Scalar
(
0
));
...
...
modules/gpu/perf/perf_calib3d.cpp
View file @
06a13d9b
...
@@ -20,7 +20,7 @@ static pair_string make_string_pair(const string& a, const string& b)
...
@@ -20,7 +20,7 @@ static pair_string make_string_pair(const string& a, const string& b)
#endif
#endif
}
}
PERF_TEST_P
(
ImagePair
,
Calib3D_StereoBM
,
Values
(
make_string_pair
(
"gpu/perf/aloe.
jpg"
,
"gpu/perf/aloeR.jp
g"
)))
PERF_TEST_P
(
ImagePair
,
Calib3D_StereoBM
,
Values
(
make_string_pair
(
"gpu/perf/aloe.
png"
,
"gpu/perf/aloeR.pn
g"
)))
{
{
declare
.
time
(
5.0
);
declare
.
time
(
5.0
);
...
...
modules/gpu/perf/perf_features2d.cpp
View file @
06a13d9b
...
@@ -10,7 +10,7 @@ namespace {
...
@@ -10,7 +10,7 @@ namespace {
DEF_PARAM_TEST_1
(
Image
,
string
);
DEF_PARAM_TEST_1
(
Image
,
string
);
PERF_TEST_P
(
Image
,
Features2D_SURF
,
Values
<
string
>
(
"gpu/perf/aloe.
jp
g"
))
PERF_TEST_P
(
Image
,
Features2D_SURF
,
Values
<
string
>
(
"gpu/perf/aloe.
pn
g"
))
{
{
declare
.
time
(
50.0
);
declare
.
time
(
50.0
);
...
@@ -51,7 +51,7 @@ PERF_TEST_P(Image, Features2D_SURF, Values<string>("gpu/perf/aloe.jpg"))
...
@@ -51,7 +51,7 @@ PERF_TEST_P(Image, Features2D_SURF, Values<string>("gpu/perf/aloe.jpg"))
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
// FAST
// FAST
PERF_TEST_P
(
Image
,
Features2D_FAST
,
Values
<
string
>
(
"gpu/perf/aloe.
jp
g"
))
PERF_TEST_P
(
Image
,
Features2D_FAST
,
Values
<
string
>
(
"gpu/perf/aloe.
pn
g"
))
{
{
cv
::
Mat
img
=
readImage
(
GetParam
(),
cv
::
IMREAD_GRAYSCALE
);
cv
::
Mat
img
=
readImage
(
GetParam
(),
cv
::
IMREAD_GRAYSCALE
);
ASSERT_FALSE
(
img
.
empty
());
ASSERT_FALSE
(
img
.
empty
());
...
@@ -87,7 +87,7 @@ PERF_TEST_P(Image, Features2D_FAST, Values<string>("gpu/perf/aloe.jpg"))
...
@@ -87,7 +87,7 @@ PERF_TEST_P(Image, Features2D_FAST, Values<string>("gpu/perf/aloe.jpg"))
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
// ORB
// ORB
PERF_TEST_P
(
Image
,
Features2D_ORB
,
Values
<
string
>
(
"gpu/perf/aloe.
jp
g"
))
PERF_TEST_P
(
Image
,
Features2D_ORB
,
Values
<
string
>
(
"gpu/perf/aloe.
pn
g"
))
{
{
cv
::
Mat
img
=
readImage
(
GetParam
(),
cv
::
IMREAD_GRAYSCALE
);
cv
::
Mat
img
=
readImage
(
GetParam
(),
cv
::
IMREAD_GRAYSCALE
);
ASSERT_FALSE
(
img
.
empty
());
ASSERT_FALSE
(
img
.
empty
());
...
...
modules/gpu/perf/perf_imgproc.cpp
View file @
06a13d9b
...
@@ -645,7 +645,7 @@ PERF_TEST_P(Sz, ImgProc_ColumnSum, GPU_TYPICAL_MAT_SIZES)
...
@@ -645,7 +645,7 @@ PERF_TEST_P(Sz, ImgProc_ColumnSum, GPU_TYPICAL_MAT_SIZES)
DEF_PARAM_TEST
(
Image_AppertureSz_L2gradient
,
string
,
int
,
bool
);
DEF_PARAM_TEST
(
Image_AppertureSz_L2gradient
,
string
,
int
,
bool
);
PERF_TEST_P
(
Image_AppertureSz_L2gradient
,
ImgProc_Canny
,
Combine
(
PERF_TEST_P
(
Image_AppertureSz_L2gradient
,
ImgProc_Canny
,
Combine
(
Values
(
"perf/800x600.
jpg"
,
"perf/1280x1024.jpg"
,
"perf/1680x1050.jp
g"
),
Values
(
"perf/800x600.
png"
,
"perf/1280x1024.png"
,
"perf/1680x1050.pn
g"
),
Values
(
3
,
5
),
Values
(
3
,
5
),
Bool
()))
Bool
()))
{
{
...
...
modules/gpu/perf/perf_video.cpp
View file @
06a13d9b
...
@@ -145,7 +145,7 @@ PERF_TEST_P(ImagePair, Video_CreateOpticalFlowNeedleMap, Values<pair_string>(mak
...
@@ -145,7 +145,7 @@ PERF_TEST_P(ImagePair, Video_CreateOpticalFlowNeedleMap, Values<pair_string>(mak
DEF_PARAM_TEST
(
Image_MinDistance
,
string
,
double
);
DEF_PARAM_TEST
(
Image_MinDistance
,
string
,
double
);
PERF_TEST_P
(
Image_MinDistance
,
Video_GoodFeaturesToTrack
,
Combine
(
Values
<
string
>
(
"gpu/perf/aloe.
jp
g"
),
Values
(
0.0
,
3.0
)))
PERF_TEST_P
(
Image_MinDistance
,
Video_GoodFeaturesToTrack
,
Combine
(
Values
<
string
>
(
"gpu/perf/aloe.
pn
g"
),
Values
(
0.0
,
3.0
)))
{
{
string
fileName
=
GET_PARAM
(
0
);
string
fileName
=
GET_PARAM
(
0
);
double
minDistance
=
GET_PARAM
(
1
);
double
minDistance
=
GET_PARAM
(
1
);
...
...
modules/gpu/test/test_imgproc.cpp
View file @
06a13d9b
...
@@ -808,10 +808,10 @@ struct MatchTemplate_CanFindBigTemplate : testing::TestWithParam<cv::gpu::Device
...
@@ -808,10 +808,10 @@ struct MatchTemplate_CanFindBigTemplate : testing::TestWithParam<cv::gpu::Device
TEST_P
(
MatchTemplate_CanFindBigTemplate
,
SQDIFF_NORMED
)
TEST_P
(
MatchTemplate_CanFindBigTemplate
,
SQDIFF_NORMED
)
{
{
cv
::
Mat
scene
=
readImage
(
"matchtemplate/scene.
jp
g"
);
cv
::
Mat
scene
=
readImage
(
"matchtemplate/scene.
pn
g"
);
ASSERT_FALSE
(
scene
.
empty
());
ASSERT_FALSE
(
scene
.
empty
());
cv
::
Mat
templ
=
readImage
(
"matchtemplate/template.
jp
g"
);
cv
::
Mat
templ
=
readImage
(
"matchtemplate/template.
pn
g"
);
ASSERT_FALSE
(
templ
.
empty
());
ASSERT_FALSE
(
templ
.
empty
());
cv
::
gpu
::
GpuMat
d_result
;
cv
::
gpu
::
GpuMat
d_result
;
...
@@ -831,10 +831,10 @@ TEST_P(MatchTemplate_CanFindBigTemplate, SQDIFF_NORMED)
...
@@ -831,10 +831,10 @@ TEST_P(MatchTemplate_CanFindBigTemplate, SQDIFF_NORMED)
TEST_P
(
MatchTemplate_CanFindBigTemplate
,
SQDIFF
)
TEST_P
(
MatchTemplate_CanFindBigTemplate
,
SQDIFF
)
{
{
cv
::
Mat
scene
=
readImage
(
"matchtemplate/scene.
jp
g"
);
cv
::
Mat
scene
=
readImage
(
"matchtemplate/scene.
pn
g"
);
ASSERT_FALSE
(
scene
.
empty
());
ASSERT_FALSE
(
scene
.
empty
());
cv
::
Mat
templ
=
readImage
(
"matchtemplate/template.
jp
g"
);
cv
::
Mat
templ
=
readImage
(
"matchtemplate/template.
pn
g"
);
ASSERT_FALSE
(
templ
.
empty
());
ASSERT_FALSE
(
templ
.
empty
());
cv
::
gpu
::
GpuMat
d_result
;
cv
::
gpu
::
GpuMat
d_result
;
...
...
modules/highgui/test/test_drawing.cpp
View file @
06a13d9b
...
@@ -60,7 +60,7 @@ protected:
...
@@ -60,7 +60,7 @@ protected:
void
CV_DrawingTest
::
run
(
int
)
void
CV_DrawingTest
::
run
(
int
)
{
{
Mat
testImg
,
valImg
;
Mat
testImg
,
valImg
;
const
string
fname
=
"drawing/image.
jp
g"
;
const
string
fname
=
"drawing/image.
pn
g"
;
string
path
=
ts
->
get_data_path
(),
filename
;
string
path
=
ts
->
get_data_path
(),
filename
;
filename
=
path
+
fname
;
filename
=
path
+
fname
;
...
...
modules/highgui/test/test_video_io.cpp
View file @
06a13d9b
...
@@ -118,7 +118,7 @@ public:
...
@@ -118,7 +118,7 @@ public:
void
CV_HighGuiTest
::
ImageTest
(
const
string
&
dir
)
void
CV_HighGuiTest
::
ImageTest
(
const
string
&
dir
)
{
{
string
_name
=
dir
+
string
(
"../cv/shared/baboon.
jp
g"
);
string
_name
=
dir
+
string
(
"../cv/shared/baboon.
pn
g"
);
ts
->
printf
(
ts
->
LOG
,
"reading image : %s
\n
"
,
_name
.
c_str
());
ts
->
printf
(
ts
->
LOG
,
"reading image : %s
\n
"
,
_name
.
c_str
());
Mat
image
=
imread
(
_name
);
Mat
image
=
imread
(
_name
);
...
@@ -143,7 +143,7 @@ void CV_HighGuiTest::ImageTest(const string& dir)
...
@@ -143,7 +143,7 @@ void CV_HighGuiTest::ImageTest(const string& dir)
#ifdef HAVE_JASPER
#ifdef HAVE_JASPER
"jp2"
,
"jp2"
,
#endif
#endif
#if
def HAVE_OPENEXR
#if
defined HAVE_OPENEXR && !defined __APPLE__
"exr"
,
"exr"
,
#endif
#endif
"bmp"
,
"bmp"
,
...
...
modules/imgproc/perf/perf_canny.cpp
View file @
06a13d9b
...
@@ -11,7 +11,7 @@ typedef perf::TestBaseWithParam<Img_Aperture_L2_thresholds_t> Img_Aperture_L2_th
...
@@ -11,7 +11,7 @@ typedef perf::TestBaseWithParam<Img_Aperture_L2_thresholds_t> Img_Aperture_L2_th
PERF_TEST_P
(
Img_Aperture_L2_thresholds
,
canny
,
PERF_TEST_P
(
Img_Aperture_L2_thresholds
,
canny
,
testing
::
Combine
(
testing
::
Combine
(
testing
::
Values
(
"cv/shared/lena.
jpg"
,
"stitching/b1.jp
g"
,
"cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png"
),
testing
::
Values
(
"cv/shared/lena.
png"
,
"stitching/b1.pn
g"
,
"cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png"
),
testing
::
Values
(
3
,
5
),
testing
::
Values
(
3
,
5
),
testing
::
Bool
(),
testing
::
Bool
(),
testing
::
Values
(
make_tuple
(
50.0
,
100.0
),
make_tuple
(
0.0
,
50.0
),
make_tuple
(
100.0
,
120.0
)
)
testing
::
Values
(
make_tuple
(
50.0
,
100.0
),
make_tuple
(
0.0
,
50.0
),
make_tuple
(
100.0
,
120.0
)
)
...
...
modules/imgproc/perf/perf_cornerEigenValsAndVecs.cpp
View file @
06a13d9b
...
@@ -13,7 +13,7 @@ typedef perf::TestBaseWithParam<Img_BlockSize_ApertureSize_BorderType_t> Img_Blo
...
@@ -13,7 +13,7 @@ typedef perf::TestBaseWithParam<Img_BlockSize_ApertureSize_BorderType_t> Img_Blo
PERF_TEST_P
(
Img_BlockSize_ApertureSize_BorderType
,
cornerEigenValsAndVecs
,
PERF_TEST_P
(
Img_BlockSize_ApertureSize_BorderType
,
cornerEigenValsAndVecs
,
testing
::
Combine
(
testing
::
Combine
(
testing
::
Values
(
"stitching/a1.
jp
g"
,
"cv/shared/pic5.png"
),
testing
::
Values
(
"stitching/a1.
pn
g"
,
"cv/shared/pic5.png"
),
testing
::
Values
(
3
,
5
),
testing
::
Values
(
3
,
5
),
testing
::
Values
(
3
,
5
),
testing
::
Values
(
3
,
5
),
testing
::
ValuesIn
(
BorderType
::
all
())
testing
::
ValuesIn
(
BorderType
::
all
())
...
...
modules/imgproc/perf/perf_cornerHarris.cpp
View file @
06a13d9b
...
@@ -13,7 +13,7 @@ typedef perf::TestBaseWithParam<Img_BlockSize_ApertureSize_k_BorderType_t> Img_B
...
@@ -13,7 +13,7 @@ typedef perf::TestBaseWithParam<Img_BlockSize_ApertureSize_k_BorderType_t> Img_B
PERF_TEST_P
(
Img_BlockSize_ApertureSize_k_BorderType
,
cornerHarris
,
PERF_TEST_P
(
Img_BlockSize_ApertureSize_k_BorderType
,
cornerHarris
,
testing
::
Combine
(
testing
::
Combine
(
testing
::
Values
(
"stitching/a1.
jp
g"
,
"cv/shared/pic5.png"
),
testing
::
Values
(
"stitching/a1.
pn
g"
,
"cv/shared/pic5.png"
),
testing
::
Values
(
3
,
5
),
testing
::
Values
(
3
,
5
),
testing
::
Values
(
3
,
5
),
testing
::
Values
(
3
,
5
),
testing
::
Values
(
0.04
,
0.1
),
testing
::
Values
(
0.04
,
0.1
),
...
...
modules/imgproc/perf/perf_goodFeaturesToTrack.cpp
View file @
06a13d9b
...
@@ -11,7 +11,7 @@ typedef perf::TestBaseWithParam<Image_MaxCorners_QualityLevel_MinDistance_BlockS
...
@@ -11,7 +11,7 @@ typedef perf::TestBaseWithParam<Image_MaxCorners_QualityLevel_MinDistance_BlockS
PERF_TEST_P
(
Image_MaxCorners_QualityLevel_MinDistance_BlockSize_UseHarris
,
goodFeaturesToTrack
,
PERF_TEST_P
(
Image_MaxCorners_QualityLevel_MinDistance_BlockSize_UseHarris
,
goodFeaturesToTrack
,
testing
::
Combine
(
testing
::
Combine
(
testing
::
Values
(
"stitching/a1.
jp
g"
,
"cv/shared/pic5.png"
),
testing
::
Values
(
"stitching/a1.
pn
g"
,
"cv/shared/pic5.png"
),
testing
::
Values
(
100
,
500
),
testing
::
Values
(
100
,
500
),
testing
::
Values
(
0.1
,
0.01
),
testing
::
Values
(
0.1
,
0.01
),
testing
::
Values
(
3
,
5
),
testing
::
Values
(
3
,
5
),
...
...
modules/imgproc/perf/perf_houghLines.cpp
View file @
06a13d9b
...
@@ -13,7 +13,7 @@ typedef perf::TestBaseWithParam<Image_RhoStep_ThetaStep_Threshold_t> Image_RhoSt
...
@@ -13,7 +13,7 @@ typedef perf::TestBaseWithParam<Image_RhoStep_ThetaStep_Threshold_t> Image_RhoSt
PERF_TEST_P
(
Image_RhoStep_ThetaStep_Threshold
,
HoughLines
,
PERF_TEST_P
(
Image_RhoStep_ThetaStep_Threshold
,
HoughLines
,
testing
::
Combine
(
testing
::
Combine
(
testing
::
Values
(
"cv/shared/pic5.png"
,
"stitching/a1.
jp
g"
),
testing
::
Values
(
"cv/shared/pic5.png"
,
"stitching/a1.
pn
g"
),
testing
::
Values
(
1
,
10
),
testing
::
Values
(
1
,
10
),
testing
::
Values
(
0.01
,
0.1
),
testing
::
Values
(
0.01
,
0.1
),
testing
::
Values
(
300
,
500
)
testing
::
Values
(
300
,
500
)
...
...
modules/imgproc/perf/perf_warp.cpp
View file @
06a13d9b
...
@@ -33,7 +33,7 @@ PERF_TEST_P( TestWarpAffine, WarpAffine,
...
@@ -33,7 +33,7 @@ PERF_TEST_P( TestWarpAffine, WarpAffine,
borderMode
=
get
<
1
>
(
GetParam
());
borderMode
=
get
<
1
>
(
GetParam
());
interType
=
get
<
2
>
(
GetParam
());
interType
=
get
<
2
>
(
GetParam
());
Mat
src
,
img
=
imread
(
getDataPath
(
"cv/shared/fruits.
jp
g"
));
Mat
src
,
img
=
imread
(
getDataPath
(
"cv/shared/fruits.
pn
g"
));
cvtColor
(
img
,
src
,
COLOR_BGR2RGBA
,
4
);
cvtColor
(
img
,
src
,
COLOR_BGR2RGBA
,
4
);
Mat
warpMat
=
getRotationMatrix2D
(
Point2f
(
src
.
cols
/
2.
f
,
src
.
rows
/
2.
f
),
30.
,
2.2
);
Mat
warpMat
=
getRotationMatrix2D
(
Point2f
(
src
.
cols
/
2.
f
,
src
.
rows
/
2.
f
),
30.
,
2.2
);
Mat
dst
(
sz
,
CV_8UC4
);
Mat
dst
(
sz
,
CV_8UC4
);
...
@@ -61,7 +61,7 @@ PERF_TEST_P( TestWarpPerspective, WarpPerspective,
...
@@ -61,7 +61,7 @@ PERF_TEST_P( TestWarpPerspective, WarpPerspective,
interType
=
get
<
2
>
(
GetParam
());
interType
=
get
<
2
>
(
GetParam
());
Mat
src
,
img
=
imread
(
getDataPath
(
"cv/shared/fruits.
jp
g"
));
Mat
src
,
img
=
imread
(
getDataPath
(
"cv/shared/fruits.
pn
g"
));
cvtColor
(
img
,
src
,
COLOR_BGR2RGBA
,
4
);
cvtColor
(
img
,
src
,
COLOR_BGR2RGBA
,
4
);
Mat
rotMat
=
getRotationMatrix2D
(
Point2f
(
src
.
cols
/
2.
f
,
src
.
rows
/
2.
f
),
30.
,
2.2
);
Mat
rotMat
=
getRotationMatrix2D
(
Point2f
(
src
.
cols
/
2.
f
,
src
.
rows
/
2.
f
),
30.
,
2.2
);
Mat
warpMat
(
3
,
3
,
CV_64FC1
);
Mat
warpMat
(
3
,
3
,
CV_64FC1
);
...
...
modules/imgproc/test/test_grabcut.cpp
View file @
06a13d9b
...
@@ -76,7 +76,7 @@ void CV_GrabcutTest::run( int /* start_from */)
...
@@ -76,7 +76,7 @@ void CV_GrabcutTest::run( int /* start_from */)
{
{
cvtest
::
DefaultRngAuto
defRng
;
cvtest
::
DefaultRngAuto
defRng
;
Mat
img
=
imread
(
string
(
ts
->
get_data_path
())
+
"shared/airplane.
jp
g"
);
Mat
img
=
imread
(
string
(
ts
->
get_data_path
())
+
"shared/airplane.
pn
g"
);
Mat
mask_prob
=
imread
(
string
(
ts
->
get_data_path
())
+
"grabcut/mask_prob.png"
,
0
);
Mat
mask_prob
=
imread
(
string
(
ts
->
get_data_path
())
+
"grabcut/mask_prob.png"
,
0
);
Mat
exp_mask1
=
imread
(
string
(
ts
->
get_data_path
())
+
"grabcut/exp_mask1.png"
,
0
);
Mat
exp_mask1
=
imread
(
string
(
ts
->
get_data_path
())
+
"grabcut/exp_mask1.png"
,
0
);
Mat
exp_mask2
=
imread
(
string
(
ts
->
get_data_path
())
+
"grabcut/exp_mask2.png"
,
0
);
Mat
exp_mask2
=
imread
(
string
(
ts
->
get_data_path
())
+
"grabcut/exp_mask2.png"
,
0
);
...
...
modules/imgproc/test/test_watershed.cpp
View file @
06a13d9b
...
@@ -62,7 +62,7 @@ void CV_WatershedTest::run( int /* start_from */)
...
@@ -62,7 +62,7 @@ void CV_WatershedTest::run( int /* start_from */)
{
{
string
exp_path
=
string
(
ts
->
get_data_path
())
+
"watershed/wshed_exp.png"
;
string
exp_path
=
string
(
ts
->
get_data_path
())
+
"watershed/wshed_exp.png"
;
Mat
exp
=
imread
(
exp_path
,
0
);
Mat
exp
=
imread
(
exp_path
,
0
);
Mat
orig
=
imread
(
string
(
ts
->
get_data_path
())
+
"inpaint/orig.
jp
g"
);
Mat
orig
=
imread
(
string
(
ts
->
get_data_path
())
+
"inpaint/orig.
pn
g"
);
FileStorage
fs
(
string
(
ts
->
get_data_path
())
+
"watershed/comp.xml"
,
FileStorage
::
READ
);
FileStorage
fs
(
string
(
ts
->
get_data_path
())
+
"watershed/comp.xml"
,
FileStorage
::
READ
);
if
(
orig
.
empty
()
||
!
fs
.
isOpened
())
if
(
orig
.
empty
()
||
!
fs
.
isOpened
())
...
...
modules/legacy/src/oneway.cpp
View file @
06a13d9b
...
@@ -661,7 +661,7 @@ namespace cv{
...
@@ -661,7 +661,7 @@ namespace cv{
for
(
int
i
=
0
;
i
<
m_pose_count
;
i
++
)
for
(
int
i
=
0
;
i
<
m_pose_count
;
i
++
)
{
{
char
buf
[
1024
];
char
buf
[
1024
];
sprintf
(
buf
,
"%s/patch_%04d.
jp
g"
,
path
,
i
);
sprintf
(
buf
,
"%s/patch_%04d.
pn
g"
,
path
,
i
);
IplImage
*
patch
=
cvCreateImage
(
cvSize
(
m_samples
[
i
]
->
width
,
m_samples
[
i
]
->
height
),
IPL_DEPTH_8U
,
m_samples
[
i
]
->
nChannels
);
IplImage
*
patch
=
cvCreateImage
(
cvSize
(
m_samples
[
i
]
->
width
,
m_samples
[
i
]
->
height
),
IPL_DEPTH_8U
,
m_samples
[
i
]
->
nChannels
);
double
maxval
;
double
maxval
;
...
...
modules/nonfree/perf/perf_surf.cpp
View file @
06a13d9b
...
@@ -10,7 +10,7 @@ typedef perf::TestBaseWithParam<std::string> surf;
...
@@ -10,7 +10,7 @@ typedef perf::TestBaseWithParam<std::string> surf;
#define SURF_IMAGES \
#define SURF_IMAGES \
"cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png",\
"cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png",\
"stitching/a3.
jp
g"
"stitching/a3.
pn
g"
PERF_TEST_P
(
surf
,
detect
,
testing
::
Values
(
SURF_IMAGES
))
PERF_TEST_P
(
surf
,
detect
,
testing
::
Values
(
SURF_IMAGES
))
{
{
...
...
modules/objdetect/perf/perf_cascadeclassifier.cpp
View file @
06a13d9b
...
@@ -11,17 +11,17 @@ typedef std::tr1::tuple<std::string, int> ImageName_MinSize_t;
...
@@ -11,17 +11,17 @@ typedef std::tr1::tuple<std::string, int> ImageName_MinSize_t;
typedef
perf
::
TestBaseWithParam
<
ImageName_MinSize_t
>
ImageName_MinSize
;
typedef
perf
::
TestBaseWithParam
<
ImageName_MinSize_t
>
ImageName_MinSize
;
PERF_TEST_P
(
ImageName_MinSize
,
CascadeClassifierLBPFrontalFace
,
PERF_TEST_P
(
ImageName_MinSize
,
CascadeClassifierLBPFrontalFace
,
testing
::
Combine
(
testing
::
Values
(
std
::
string
(
"cv/shared/lena.
jp
g"
),
testing
::
Combine
(
testing
::
Values
(
std
::
string
(
"cv/shared/lena.
pn
g"
),
std
::
string
(
"cv/shared/1_itseez-0000247.
jp
g"
),
std
::
string
(
"cv/shared/1_itseez-0000247.
pn
g"
),
std
::
string
(
"cv/shared/1_itseez-0000289.
jp
g"
),
std
::
string
(
"cv/shared/1_itseez-0000289.
pn
g"
),
std
::
string
(
"cv/shared/1_itseez-0000492.
jp
g"
),
std
::
string
(
"cv/shared/1_itseez-0000492.
pn
g"
),
std
::
string
(
"cv/shared/1_itseez-0000573.
jp
g"
),
std
::
string
(
"cv/shared/1_itseez-0000573.
pn
g"
),
std
::
string
(
"cv/shared/1_itseez-0000803.
jp
g"
),
std
::
string
(
"cv/shared/1_itseez-0000803.
pn
g"
),
std
::
string
(
"cv/shared/1_itseez-0000892.
jp
g"
),
std
::
string
(
"cv/shared/1_itseez-0000892.
pn
g"
),
std
::
string
(
"cv/shared/1_itseez-0000984.
jp
g"
),
std
::
string
(
"cv/shared/1_itseez-0000984.
pn
g"
),
std
::
string
(
"cv/shared/1_itseez-0001238.
jp
g"
),
std
::
string
(
"cv/shared/1_itseez-0001238.
pn
g"
),
std
::
string
(
"cv/shared/1_itseez-0001438.
jp
g"
),
std
::
string
(
"cv/shared/1_itseez-0001438.
pn
g"
),
std
::
string
(
"cv/shared/1_itseez-0002524.
jp
g"
)),
std
::
string
(
"cv/shared/1_itseez-0002524.
pn
g"
)),
testing
::
Values
(
24
,
30
,
40
,
50
,
60
,
70
,
80
,
90
)
testing
::
Values
(
24
,
30
,
40
,
50
,
60
,
70
,
80
,
90
)
)
)
)
)
...
...
modules/objdetect/test/test_latentsvmdetector.cpp
View file @
06a13d9b
...
@@ -76,7 +76,7 @@ bool CV_LatentSVMDetectorTest::isEqual(CvRect r1, CvRect r2, int eps)
...
@@ -76,7 +76,7 @@ bool CV_LatentSVMDetectorTest::isEqual(CvRect r1, CvRect r2, int eps)
void
CV_LatentSVMDetectorTest
::
run
(
int
/* start_from */
)
void
CV_LatentSVMDetectorTest
::
run
(
int
/* start_from */
)
{
{
string
img_path
=
string
(
ts
->
get_data_path
())
+
"latentsvmdetector/cat.
jp
g"
;
string
img_path
=
string
(
ts
->
get_data_path
())
+
"latentsvmdetector/cat.
pn
g"
;
string
model_path
=
string
(
ts
->
get_data_path
())
+
"latentsvmdetector/models_VOC2007/cat.xml"
;
string
model_path
=
string
(
ts
->
get_data_path
())
+
"latentsvmdetector/models_VOC2007/cat.xml"
;
int
numThreads
=
-
1
;
int
numThreads
=
-
1
;
...
@@ -204,8 +204,8 @@ bool compareResults( const vector<LatentSvmDetector::ObjectDetection>& calc, con
...
@@ -204,8 +204,8 @@ bool compareResults( const vector<LatentSvmDetector::ObjectDetection>& calc, con
void
LatentSVMDetectorTest
::
run
(
int
/* start_from */
)
void
LatentSVMDetectorTest
::
run
(
int
/* start_from */
)
{
{
string
img_path_cat
=
string
(
ts
->
get_data_path
())
+
"latentsvmdetector/cat.
jp
g"
;
string
img_path_cat
=
string
(
ts
->
get_data_path
())
+
"latentsvmdetector/cat.
pn
g"
;
string
img_path_cars
=
string
(
ts
->
get_data_path
())
+
"latentsvmdetector/cars.
jp
g"
;
string
img_path_cars
=
string
(
ts
->
get_data_path
())
+
"latentsvmdetector/cars.
pn
g"
;
string
model_path_cat
=
string
(
ts
->
get_data_path
())
+
"latentsvmdetector/models_VOC2007/cat.xml"
;
string
model_path_cat
=
string
(
ts
->
get_data_path
())
+
"latentsvmdetector/models_VOC2007/cat.xml"
;
string
model_path_car
=
string
(
ts
->
get_data_path
())
+
"latentsvmdetector/models_VOC2007/car.xml"
;
string
model_path_car
=
string
(
ts
->
get_data_path
())
+
"latentsvmdetector/models_VOC2007/car.xml"
;
...
@@ -263,17 +263,17 @@ void LatentSVMDetectorTest::run( int /* start_from */)
...
@@ -263,17 +263,17 @@ void LatentSVMDetectorTest::run( int /* start_from */)
if
(
!
compareResults
(
detections1_cat
,
true_detections1_cat
,
1
,
score_thr
)
)
if
(
!
compareResults
(
detections1_cat
,
true_detections1_cat
,
1
,
score_thr
)
)
{
{
std
::
cerr
<<
"Results of detector1 are invalid on image cat.
jp
g"
<<
std
::
endl
;
std
::
cerr
<<
"Results of detector1 are invalid on image cat.
pn
g"
<<
std
::
endl
;
ts
->
set_failed_test_info
(
cvtest
::
TS
::
FAIL_MISMATCH
);
ts
->
set_failed_test_info
(
cvtest
::
TS
::
FAIL_MISMATCH
);
}
}
if
(
!
compareResults
(
detections12_cat
,
true_detections12_cat
,
1
,
score_thr
)
)
if
(
!
compareResults
(
detections12_cat
,
true_detections12_cat
,
1
,
score_thr
)
)
{
{
std
::
cerr
<<
"Results of detector12 are invalid on image cat.
jp
g"
<<
std
::
endl
;
std
::
cerr
<<
"Results of detector12 are invalid on image cat.
pn
g"
<<
std
::
endl
;
ts
->
set_failed_test_info
(
cvtest
::
TS
::
FAIL_MISMATCH
);
ts
->
set_failed_test_info
(
cvtest
::
TS
::
FAIL_MISMATCH
);
}
}
if
(
!
compareResults
(
detections12_cars
,
true_detections12_cars
,
1
,
score_thr
)
)
if
(
!
compareResults
(
detections12_cars
,
true_detections12_cars
,
1
,
score_thr
)
)
{
{
std
::
cerr
<<
"Results of detector12 are invalid on image cars.
jp
g"
<<
std
::
endl
;
std
::
cerr
<<
"Results of detector12 are invalid on image cars.
pn
g"
<<
std
::
endl
;
ts
->
set_failed_test_info
(
cvtest
::
TS
::
FAIL_MISMATCH
);
ts
->
set_failed_test_info
(
cvtest
::
TS
::
FAIL_MISMATCH
);
}
}
}
}
...
...
modules/photo/test/test_inpaint.cpp
View file @
06a13d9b
...
@@ -62,7 +62,7 @@ CV_InpaintTest::~CV_InpaintTest() {}
...
@@ -62,7 +62,7 @@ CV_InpaintTest::~CV_InpaintTest() {}
void
CV_InpaintTest
::
run
(
int
)
void
CV_InpaintTest
::
run
(
int
)
{
{
string
folder
=
string
(
ts
->
get_data_path
())
+
"inpaint/"
;
string
folder
=
string
(
ts
->
get_data_path
())
+
"inpaint/"
;
Mat
orig
=
imread
(
folder
+
"orig.
jp
g"
);
Mat
orig
=
imread
(
folder
+
"orig.
pn
g"
);
Mat
exp1
=
imread
(
folder
+
"exp1.png"
);
Mat
exp1
=
imread
(
folder
+
"exp1.png"
);
Mat
exp2
=
imread
(
folder
+
"exp2.png"
);
Mat
exp2
=
imread
(
folder
+
"exp2.png"
);
Mat
mask
=
imread
(
folder
+
"mask.png"
);
Mat
mask
=
imread
(
folder
+
"mask.png"
);
...
...
modules/stitching/perf/perf_stich.cpp
View file @
06a13d9b
...
@@ -30,9 +30,9 @@ PERF_TEST_P(stitch, a123, TEST_DETECTORS)
...
@@ -30,9 +30,9 @@ PERF_TEST_P(stitch, a123, TEST_DETECTORS)
Mat
pano
;
Mat
pano
;
vector
<
Mat
>
imgs
;
vector
<
Mat
>
imgs
;
imgs
.
push_back
(
imread
(
getDataPath
(
"stitching/a1.
jp
g"
)
)
);
imgs
.
push_back
(
imread
(
getDataPath
(
"stitching/a1.
pn
g"
)
)
);
imgs
.
push_back
(
imread
(
getDataPath
(
"stitching/a2.
jp
g"
)
)
);
imgs
.
push_back
(
imread
(
getDataPath
(
"stitching/a2.
pn
g"
)
)
);
imgs
.
push_back
(
imread
(
getDataPath
(
"stitching/a3.
jp
g"
)
)
);
imgs
.
push_back
(
imread
(
getDataPath
(
"stitching/a3.
pn
g"
)
)
);
Ptr
<
detail
::
FeaturesFinder
>
featuresFinder
=
GetParam
()
==
"orb"
Ptr
<
detail
::
FeaturesFinder
>
featuresFinder
=
GetParam
()
==
"orb"
?
(
detail
::
FeaturesFinder
*
)
new
detail
::
OrbFeaturesFinder
()
?
(
detail
::
FeaturesFinder
*
)
new
detail
::
OrbFeaturesFinder
()
...
@@ -63,8 +63,8 @@ PERF_TEST_P(stitch, b12, TEST_DETECTORS)
...
@@ -63,8 +63,8 @@ PERF_TEST_P(stitch, b12, TEST_DETECTORS)
Mat
pano
;
Mat
pano
;
vector
<
Mat
>
imgs
;
vector
<
Mat
>
imgs
;
imgs
.
push_back
(
imread
(
getDataPath
(
"stitching/b1.
jp
g"
)
)
);
imgs
.
push_back
(
imread
(
getDataPath
(
"stitching/b1.
pn
g"
)
)
);
imgs
.
push_back
(
imread
(
getDataPath
(
"stitching/b2.
jp
g"
)
)
);
imgs
.
push_back
(
imread
(
getDataPath
(
"stitching/b2.
pn
g"
)
)
);
Ptr
<
detail
::
FeaturesFinder
>
featuresFinder
=
GetParam
()
==
"orb"
Ptr
<
detail
::
FeaturesFinder
>
featuresFinder
=
GetParam
()
==
"orb"
?
(
detail
::
FeaturesFinder
*
)
new
detail
::
OrbFeaturesFinder
()
?
(
detail
::
FeaturesFinder
*
)
new
detail
::
OrbFeaturesFinder
()
...
@@ -92,8 +92,8 @@ PERF_TEST_P(stitch, b12, TEST_DETECTORS)
...
@@ -92,8 +92,8 @@ PERF_TEST_P(stitch, b12, TEST_DETECTORS)
PERF_TEST_P
(
match
,
bestOf2Nearest
,
TEST_DETECTORS
)
PERF_TEST_P
(
match
,
bestOf2Nearest
,
TEST_DETECTORS
)
{
{
Mat
img1
,
img1_full
=
imread
(
getDataPath
(
"stitching/b1.
jp
g"
)
);
Mat
img1
,
img1_full
=
imread
(
getDataPath
(
"stitching/b1.
pn
g"
)
);
Mat
img2
,
img2_full
=
imread
(
getDataPath
(
"stitching/b2.
jp
g"
)
);
Mat
img2
,
img2_full
=
imread
(
getDataPath
(
"stitching/b2.
pn
g"
)
);
float
scale1
=
(
float
)
std
::
min
(
1.0
,
sqrt
(
WORK_MEGAPIX
*
1e6
/
img1_full
.
total
()));
float
scale1
=
(
float
)
std
::
min
(
1.0
,
sqrt
(
WORK_MEGAPIX
*
1e6
/
img1_full
.
total
()));
float
scale2
=
(
float
)
std
::
min
(
1.0
,
sqrt
(
WORK_MEGAPIX
*
1e6
/
img2_full
.
total
()));
float
scale2
=
(
float
)
std
::
min
(
1.0
,
sqrt
(
WORK_MEGAPIX
*
1e6
/
img2_full
.
total
()));
resize
(
img1_full
,
img1
,
Size
(),
scale1
,
scale1
);
resize
(
img1_full
,
img1
,
Size
(),
scale1
,
scale1
);
...
@@ -140,8 +140,8 @@ PERF_TEST_P( matchVector, bestOf2NearestVectorFeatures, testing::Combine(
...
@@ -140,8 +140,8 @@ PERF_TEST_P( matchVector, bestOf2NearestVectorFeatures, testing::Combine(
testing
::
Values
(
2
,
4
,
6
,
8
))
testing
::
Values
(
2
,
4
,
6
,
8
))
)
)
{
{
Mat
img1
,
img1_full
=
imread
(
getDataPath
(
"stitching/b1.
jp
g"
)
);
Mat
img1
,
img1_full
=
imread
(
getDataPath
(
"stitching/b1.
pn
g"
)
);
Mat
img2
,
img2_full
=
imread
(
getDataPath
(
"stitching/b2.
jp
g"
)
);
Mat
img2
,
img2_full
=
imread
(
getDataPath
(
"stitching/b2.
pn
g"
)
);
float
scale1
=
(
float
)
std
::
min
(
1.0
,
sqrt
(
WORK_MEGAPIX
*
1e6
/
img1_full
.
total
()));
float
scale1
=
(
float
)
std
::
min
(
1.0
,
sqrt
(
WORK_MEGAPIX
*
1e6
/
img1_full
.
total
()));
float
scale2
=
(
float
)
std
::
min
(
1.0
,
sqrt
(
WORK_MEGAPIX
*
1e6
/
img2_full
.
total
()));
float
scale2
=
(
float
)
std
::
min
(
1.0
,
sqrt
(
WORK_MEGAPIX
*
1e6
/
img2_full
.
total
()));
resize
(
img1_full
,
img1
,
Size
(),
scale1
,
scale1
);
resize
(
img1_full
,
img1
,
Size
(),
scale1
,
scale1
);
...
...
modules/stitching/test/test_blenders.cpp
View file @
06a13d9b
...
@@ -46,8 +46,8 @@ using namespace std;
...
@@ -46,8 +46,8 @@ using namespace std;
TEST
(
MultiBandBlender
,
CanBlendTwoImages
)
TEST
(
MultiBandBlender
,
CanBlendTwoImages
)
{
{
Mat
image1
=
imread
(
string
(
cvtest
::
TS
::
ptr
()
->
get_data_path
())
+
"cv/shared/baboon.
jp
g"
);
Mat
image1
=
imread
(
string
(
cvtest
::
TS
::
ptr
()
->
get_data_path
())
+
"cv/shared/baboon.
pn
g"
);
Mat
image2
=
imread
(
string
(
cvtest
::
TS
::
ptr
()
->
get_data_path
())
+
"cv/shared/lena.
jp
g"
);
Mat
image2
=
imread
(
string
(
cvtest
::
TS
::
ptr
()
->
get_data_path
())
+
"cv/shared/lena.
pn
g"
);
ASSERT_EQ
(
image1
.
rows
,
image2
.
rows
);
ASSERT_EQ
(
image1
.
cols
,
image2
.
cols
);
ASSERT_EQ
(
image1
.
rows
,
image2
.
rows
);
ASSERT_EQ
(
image1
.
cols
,
image2
.
cols
);
Mat
image1s
,
image2s
;
Mat
image1s
,
image2s
;
...
...
modules/stitching/test/test_matchers.cpp
View file @
06a13d9b
...
@@ -50,7 +50,7 @@ using namespace std;
...
@@ -50,7 +50,7 @@ using namespace std;
TEST
(
SurfFeaturesFinder
,
CanFindInROIs
)
TEST
(
SurfFeaturesFinder
,
CanFindInROIs
)
{
{
Ptr
<
detail
::
FeaturesFinder
>
finder
=
new
detail
::
SurfFeaturesFinder
();
Ptr
<
detail
::
FeaturesFinder
>
finder
=
new
detail
::
SurfFeaturesFinder
();
Mat
img
=
imread
(
string
(
cvtest
::
TS
::
ptr
()
->
get_data_path
())
+
"cv/shared/lena.
jp
g"
);
Mat
img
=
imread
(
string
(
cvtest
::
TS
::
ptr
()
->
get_data_path
())
+
"cv/shared/lena.
pn
g"
);
vector
<
Rect
>
rois
;
vector
<
Rect
>
rois
;
rois
.
push_back
(
Rect
(
0
,
0
,
img
.
cols
/
2
,
img
.
rows
/
2
));
rois
.
push_back
(
Rect
(
0
,
0
,
img
.
cols
/
2
,
img
.
rows
/
2
));
...
...
modules/video/perf/perf_optflowpyrlk.cpp
View file @
06a13d9b
...
@@ -29,7 +29,7 @@ void FormTrackingPointsArray(vector<Point2f>& points, int width, int height, int
...
@@ -29,7 +29,7 @@ void FormTrackingPointsArray(vector<Point2f>& points, int width, int height, int
}
}
PERF_TEST_P
(
Path_Idx_Cn_NPoints_WSize
,
OpticalFlowPyrLK_full
,
testing
::
Combine
(
PERF_TEST_P
(
Path_Idx_Cn_NPoints_WSize
,
OpticalFlowPyrLK_full
,
testing
::
Combine
(
testing
::
Values
<
std
::
string
>
(
"cv/optflow/frames/VGA_%02d.png"
,
"cv/optflow/frames/720p_%02d.
jp
g"
),
testing
::
Values
<
std
::
string
>
(
"cv/optflow/frames/VGA_%02d.png"
,
"cv/optflow/frames/720p_%02d.
pn
g"
),
testing
::
Range
(
1
,
3
),
testing
::
Range
(
1
,
3
),
testing
::
Values
(
1
,
3
,
4
),
testing
::
Values
(
1
,
3
,
4
),
testing
::
Values
(
make_tuple
(
9
,
9
),
make_tuple
(
15
,
15
)),
testing
::
Values
(
make_tuple
(
9
,
9
),
make_tuple
(
15
,
15
)),
...
@@ -97,7 +97,7 @@ typedef tr1::tuple<std::string, int, int, tr1::tuple<int,int>, int, bool> Path_I
...
@@ -97,7 +97,7 @@ typedef tr1::tuple<std::string, int, int, tr1::tuple<int,int>, int, bool> Path_I
typedef
TestBaseWithParam
<
Path_Idx_Cn_NPoints_WSize_Deriv_t
>
Path_Idx_Cn_NPoints_WSize_Deriv
;
typedef
TestBaseWithParam
<
Path_Idx_Cn_NPoints_WSize_Deriv_t
>
Path_Idx_Cn_NPoints_WSize_Deriv
;
PERF_TEST_P
(
Path_Idx_Cn_NPoints_WSize_Deriv
,
OpticalFlowPyrLK_self
,
testing
::
Combine
(
PERF_TEST_P
(
Path_Idx_Cn_NPoints_WSize_Deriv
,
OpticalFlowPyrLK_self
,
testing
::
Combine
(
testing
::
Values
<
std
::
string
>
(
"cv/optflow/frames/VGA_%02d.png"
,
"cv/optflow/frames/720p_%02d.
jp
g"
),
testing
::
Values
<
std
::
string
>
(
"cv/optflow/frames/VGA_%02d.png"
,
"cv/optflow/frames/720p_%02d.
pn
g"
),
testing
::
Range
(
1
,
3
),
testing
::
Range
(
1
,
3
),
testing
::
Values
(
1
,
3
,
4
),
testing
::
Values
(
1
,
3
,
4
),
testing
::
Values
(
make_tuple
(
9
,
9
),
make_tuple
(
15
,
15
)),
testing
::
Values
(
make_tuple
(
9
,
9
),
make_tuple
(
15
,
15
)),
...
@@ -173,7 +173,7 @@ typedef tr1::tuple<std::string, int, bool, PyrBorderMode, bool> Path_Win_Deriv_B
...
@@ -173,7 +173,7 @@ typedef tr1::tuple<std::string, int, bool, PyrBorderMode, bool> Path_Win_Deriv_B
typedef
TestBaseWithParam
<
Path_Win_Deriv_Border_Reuse_t
>
Path_Win_Deriv_Border_Reuse
;
typedef
TestBaseWithParam
<
Path_Win_Deriv_Border_Reuse_t
>
Path_Win_Deriv_Border_Reuse
;
PERF_TEST_P
(
Path_Win_Deriv_Border_Reuse
,
OpticalFlowPyrLK_pyr
,
testing
::
Combine
(
PERF_TEST_P
(
Path_Win_Deriv_Border_Reuse
,
OpticalFlowPyrLK_pyr
,
testing
::
Combine
(
testing
::
Values
<
std
::
string
>
(
"cv/optflow/frames/720p_01.
jp
g"
),
testing
::
Values
<
std
::
string
>
(
"cv/optflow/frames/720p_01.
pn
g"
),
testing
::
Values
(
7
,
11
),
testing
::
Values
(
7
,
11
),
testing
::
Bool
(),
testing
::
Bool
(),
testing
::
ValuesIn
(
PyrBorderMode
::
all
()),
testing
::
ValuesIn
(
PyrBorderMode
::
all
()),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment