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
e309c514
Commit
e309c514
authored
May 18, 2012
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed phaseCorrelate result for not power of 2 size images #1812 (thanks to Jeff Mast)
parent
b8804ccc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
phasecorr.cpp
modules/imgproc/src/phasecorr.cpp
+1
-1
test_pc.cpp
modules/imgproc/test/test_pc.cpp
+2
-2
No files found.
modules/imgproc/src/phasecorr.cpp
View file @
e309c514
...
...
@@ -556,7 +556,7 @@ cv::Point2d cv::phaseCorrelate(InputArray _src1, InputArray _src2, InputArray _w
t
=
weightedCentroid
(
C
,
peakLoc
,
Size
(
5
,
5
));
// adjust shift relative to image center...
Point2d
center
((
double
)
src1
.
cols
/
2.0
,
(
double
)
src
1
.
rows
/
2.0
);
Point2d
center
((
double
)
padded1
.
cols
/
2.0
,
(
double
)
padded
1
.
rows
/
2.0
);
return
(
center
-
t
);
}
...
...
modules/imgproc/test/test_pc.cpp
View file @
e309c514
...
...
@@ -63,8 +63,8 @@ void CV_PhaseCorrelatorTest::run( int )
{
ts
->
set_failed_test_info
(
cvtest
::
TS
::
OK
);
Mat
r1
=
Mat
::
ones
(
Size
(
12
8
,
128
),
CV_64F
);
Mat
r2
=
Mat
::
ones
(
Size
(
12
8
,
128
),
CV_64F
);
Mat
r1
=
Mat
::
ones
(
Size
(
12
9
,
128
),
CV_64F
);
Mat
r2
=
Mat
::
ones
(
Size
(
12
9
,
128
),
CV_64F
);
double
expectedShiftX
=
-
10.0
;
double
expectedShiftY
=
-
20.0
;
...
...
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