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
fb2fad52
Commit
fb2fad52
authored
Nov 27, 2011
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug in cv::pyrUp. Reenabled accuracy test.
parent
35e69a1e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
pyramids.cpp
modules/imgproc/src/pyramids.cpp
+1
-1
test_filter.cpp
modules/imgproc/test/test_filter.cpp
+7
-7
No files found.
modules/imgproc/src/pyramids.cpp
View file @
fb2fad52
...
...
@@ -349,7 +349,7 @@ pyrUp_( const Mat& _src, Mat& _dst )
for
(
;
sy
<=
y
+
1
;
sy
++
)
{
WT
*
row
=
buf
+
((
sy
-
sy0
)
%
PU_SZ
)
*
bufstep
;
int
_sy
=
borderInterpolate
(
sy
,
ssize
.
height
,
BORDER_REFLECT_101
)
;
int
_sy
=
borderInterpolate
(
sy
*
2
,
dsize
.
height
,
BORDER_REFLECT_101
)
/
2
;
const
T
*
src
=
(
const
T
*
)(
_src
.
data
+
_src
.
step
*
_sy
);
if
(
ssize
.
width
==
cn
)
...
...
modules/imgproc/test/test_filter.cpp
View file @
fb2fad52
...
...
@@ -1038,7 +1038,7 @@ CV_PyramidBaseTest::CV_PyramidBaseTest( bool _downsample ) : CV_FilterBaseTest(t
double
CV_PyramidBaseTest
::
get_success_error_level
(
int
/*test_case_idx*/
,
int
/*i*/
,
int
/*j*/
)
{
int
depth
=
test_mat
[
INPUT
][
0
].
depth
();
return
depth
<
=
CV_8S
?
1
:
1e-5
;
return
depth
<
CV_32F
?
1
:
1e-5
;
}
...
...
@@ -1046,12 +1046,15 @@ void CV_PyramidBaseTest::get_test_array_types_and_sizes( int test_case_idx,
vector
<
vector
<
Size
>
>&
sizes
,
vector
<
vector
<
int
>
>&
types
)
{
const
int
channels
[]
=
{
1
,
3
,
4
};
const
int
depthes
[]
=
{
CV_8U
,
CV_16S
,
CV_16U
,
CV_32F
};
RNG
&
rng
=
ts
->
get_rng
();
CvSize
sz
;
CV_FilterBaseTest
::
get_test_array_types_and_sizes
(
test_case_idx
,
sizes
,
types
);
int
depth
=
cvtest
::
randInt
(
rng
)
%
2
?
CV_32F
:
CV_8U
;
int
cn
=
c
vtest
::
randInt
(
rng
)
&
1
?
3
:
1
;
int
depth
=
depthes
[
cvtest
::
randInt
(
rng
)
%
(
sizeof
(
depthes
)
/
sizeof
(
depthes
[
0
]))]
;
int
cn
=
c
hannels
[
cvtest
::
randInt
(
rng
)
%
(
sizeof
(
channels
)
/
sizeof
(
channels
[
0
]))]
;
aperture_size
=
cvSize
(
5
,
5
);
anchor
=
cvPoint
(
aperture_size
.
width
/
2
,
aperture_size
.
height
/
2
);
...
...
@@ -1182,9 +1185,6 @@ void CV_PyramidUpTest::prepare_to_validation( int /*test_case_idx*/ )
cvtest
::
filter2D
(
temp
,
dst
,
dst
.
depth
(),
kernel
,
Point
(
kernel
.
cols
/
2
,
kernel
.
rows
/
2
),
0
,
BORDER_REFLECT_101
);
// TODO: fix the problem with 2 bottom rows.
memset
(
dst
.
ptr
(
dst
.
rows
-
2
),
0
,
dst
.
step
*
2
);
memset
(
test_mat
[
OUTPUT
][
0
].
ptr
(
dst
.
rows
-
2
),
0
,
test_mat
[
OUTPUT
][
0
].
step
*
2
);
}
...
...
@@ -1770,7 +1770,7 @@ TEST(Imgproc_Blur, accuracy) { CV_BlurTest test; test.safe_run(); }
TEST
(
Imgproc_GaussianBlur
,
accuracy
)
{
CV_GaussianBlurTest
test
;
test
.
safe_run
();
}
TEST
(
Imgproc_MedianBlur
,
accuracy
)
{
CV_MedianBlurTest
test
;
test
.
safe_run
();
}
TEST
(
Imgproc_PyramidDown
,
accuracy
)
{
CV_PyramidDownTest
test
;
test
.
safe_run
();
}
//
TEST(Imgproc_PyramidUp, accuracy) { CV_PyramidUpTest test; test.safe_run(); }
TEST
(
Imgproc_PyramidUp
,
accuracy
)
{
CV_PyramidUpTest
test
;
test
.
safe_run
();
}
TEST
(
Imgproc_MinEigenVal
,
accuracy
)
{
CV_MinEigenValTest
test
;
test
.
safe_run
();
}
TEST
(
Imgproc_EigenValsVecs
,
accuracy
)
{
CV_EigenValVecTest
test
;
test
.
safe_run
();
}
TEST
(
Imgproc_PreCornerDetect
,
accuracy
)
{
CV_PreCornerDetectTest
test
;
test
.
safe_run
();
}
...
...
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