Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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_contrib
Commits
fbb27ed0
Commit
fbb27ed0
authored
Aug 14, 2014
by
Bellaktris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
e92394d0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
annf.hpp
modules/xphoto/src/annf.hpp
+3
-3
photomontage.hpp
modules/xphoto/src/photomontage.hpp
+4
-4
whs.hpp
modules/xphoto/src/whs.hpp
+3
-3
No files found.
modules/xphoto/src/annf.hpp
View file @
fbb27ed0
...
...
@@ -211,7 +211,7 @@ static void dominantTransforms(const cv::Mat &img, std::vector <cv::Matx33f> &tr
int
current
=
i
*
whs
.
cols
+
j
;
int
dy
[]
=
{
0
,
1
,
0
},
dx
[]
=
{
0
,
0
,
1
};
for
(
int
k
=
0
;
k
<
sizeof
(
dy
)
/
sizeof
(
int
);
++
k
)
for
(
int
k
=
0
;
k
<
int
(
sizeof
(
dy
)
/
sizeof
(
int
)
);
++
k
)
if
(
i
-
dy
[
k
]
>=
0
&&
j
-
dx
[
k
]
>=
0
)
{
int
neighbor
=
(
i
-
dy
[
k
])
*
whs
.
cols
+
(
j
-
dx
[
k
]);
...
...
@@ -240,8 +240,8 @@ static void dominantTransforms(const cv::Mat &img, std::vector <cv::Matx33f> &tr
for
(
int
i
=
0
,
t
=
0
;
i
<
annfHist
.
rows
;
++
i
)
{
double
*
pAnnfHist
=
annfHist
.
template
ptr
<
double
>
(
i
);
double
*
_pAnnfHist
=
_annfHist
.
template
ptr
<
double
>
(
i
);
double
*
pAnnfHist
=
annfHist
.
ptr
<
double
>
(
i
);
double
*
_pAnnfHist
=
_annfHist
.
ptr
<
double
>
(
i
);
for
(
int
j
=
0
;
j
<
annfHist
.
cols
;
++
j
)
if
(
pAnnfHist
[
j
]
!=
0
&&
pAnnfHist
[
j
]
==
_pAnnfHist
[
j
]
)
...
...
modules/xphoto/src/photomontage.hpp
View file @
fbb27ed0
...
...
@@ -175,17 +175,17 @@ singleExpansion(const int alpha)
for
(
int
j
=
0
;
j
<
width
-
1
;
++
j
)
{
setWeights
(
graph
,
cv
::
Point
(
i
,
j
),
cv
::
Point
(
i
,
j
+
1
),
currentRow
[
j
],
currentRow
[
j
+
1
],
alpha
);
setWeights
(
graph
,
cv
::
Point
(
i
,
j
),
cv
::
Point
(
i
+
1
,
j
),
currentRow
[
j
],
nextRow
[
j
],
alpha
);
setWeights
(
graph
,
cv
::
Point
(
j
,
i
),
cv
::
Point
(
j
+
1
,
i
),
currentRow
[
j
],
currentRow
[
j
+
1
],
alpha
);
setWeights
(
graph
,
cv
::
Point
(
j
,
i
),
cv
::
Point
(
j
,
i
+
1
),
currentRow
[
j
],
nextRow
[
j
],
alpha
);
}
setWeights
(
graph
,
cv
::
Point
(
i
,
width
-
1
),
cv
::
Point
(
i
+
1
,
width
-
1
),
setWeights
(
graph
,
cv
::
Point
(
width
-
1
,
i
),
cv
::
Point
(
width
-
1
,
i
+
1
),
currentRow
[
width
-
1
],
nextRow
[
width
-
1
],
alpha
);
}
const
int
*
currentRow
=
(
const
int
*
)
x_i
.
template
ptr
<
int
>
(
height
-
1
);
for
(
int
i
=
0
;
i
<
width
-
1
;
++
i
)
setWeights
(
graph
,
cv
::
Point
(
height
-
1
,
i
),
cv
::
Point
(
height
-
1
,
i
+
1
),
setWeights
(
graph
,
cv
::
Point
(
i
,
height
-
1
),
cv
::
Point
(
i
+
1
,
height
-
1
),
currentRow
[
i
],
currentRow
[
i
+
1
],
alpha
);
/** Max-flow computation **/
...
...
modules/xphoto/src/whs.hpp
View file @
fbb27ed0
...
...
@@ -101,10 +101,10 @@ static void nextProjection(std::vector <cv::Mat> &projections, const cv::Point &
for
(
int
i
=
dy
;
i
<
nproj
.
rows
;
++
i
)
{
float
*
vxNext
=
nproj
.
template
ptr
<
float
>
(
i
-
dy
);
float
*
vNext
=
nproj
.
template
ptr
<
float
>
(
i
);
float
*
vxNext
=
nproj
.
ptr
<
float
>
(
i
-
dy
);
float
*
vNext
=
nproj
.
ptr
<
float
>
(
i
);
float
*
vxCurrent
=
proj
.
template
ptr
<
float
>
(
i
-
dy
);
float
*
vxCurrent
=
proj
.
ptr
<
float
>
(
i
-
dy
);
if
(
plusToMinusUpdate
)
for
(
int
j
=
dx
;
j
<
nproj
.
cols
;
++
j
)
...
...
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