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
4eaf9946
Commit
4eaf9946
authored
Aug 07, 2014
by
Bellaktris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
try to fix more errors
parent
2c6f707b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
photomontage.hpp
modules/xphoto/src/photomontage.hpp
+16
-16
No files found.
modules/xphoto/src/photomontage.hpp
View file @
4eaf9946
...
...
@@ -113,10 +113,10 @@ setWeights(GCGraph <double> &graph, const cv::Point &pA, const cv::Point &pB, co
if
(
lA
==
lB
)
{
/** Link from A to B **/
double
weightAB
=
dist
(
images
[
lA
].
at
<
Tp
>
(
pA
),
images
[
lA
].
at
<
Tp
>
(
pB
),
images
[
lX
].
at
<
Tp
>
(
pA
),
images
[
lX
].
at
<
Tp
>
(
pB
)
);
double
weightAB
=
dist
(
images
[
lA
].
at
<
typename
Tp
>
(
pA
),
images
[
lA
].
at
<
typename
Tp
>
(
pB
),
images
[
lX
].
at
<
typename
Tp
>
(
pA
),
images
[
lX
].
at
<
typename
Tp
>
(
pB
)
);
graph
.
addEdges
(
int
(
pA
.
y
*
width
+
pA
.
x
),
int
(
pB
.
y
*
width
+
pB
.
x
),
weightAB
,
weightAB
);
}
else
...
...
@@ -124,24 +124,24 @@ setWeights(GCGraph <double> &graph, const cv::Point &pA, const cv::Point &pB, co
int
X
=
graph
.
addVtx
();
/** Link from X to sink **/
double
weightXS
=
dist
(
images
[
lA
].
at
<
Tp
>
(
pA
),
images
[
lA
].
at
<
Tp
>
(
pB
),
images
[
lB
].
at
<
Tp
>
(
pA
),
images
[
lB
].
at
<
Tp
>
(
pB
)
);
double
weightXS
=
dist
(
images
[
lA
].
at
<
typename
Tp
>
(
pA
),
images
[
lA
].
at
<
typename
Tp
>
(
pB
),
images
[
lB
].
at
<
typename
Tp
>
(
pA
),
images
[
lB
].
at
<
typename
Tp
>
(
pB
)
);
graph
.
addTermWeights
(
X
,
0
,
weightXS
);
/** Link from A to X **/
double
weightAX
=
dist
(
images
[
lA
].
at
<
Tp
>
(
pA
),
images
[
lA
].
at
<
Tp
>
(
pB
),
images
[
lX
].
at
<
Tp
>
(
pA
),
images
[
lX
].
at
<
Tp
>
(
pB
)
);
double
weightAX
=
dist
(
images
[
lA
].
at
<
typename
Tp
>
(
pA
),
images
[
lA
].
at
<
typename
Tp
>
(
pB
),
images
[
lX
].
at
<
typename
Tp
>
(
pA
),
images
[
lX
].
at
<
typename
Tp
>
(
pB
)
);
graph
.
addEdges
(
int
(
pA
.
y
*
width
+
pA
.
x
),
X
,
weightAX
,
weightAX
);
/** Link from X to B **/
double
weightXB
=
dist
(
images
[
lX
].
at
<
Tp
>
(
pA
),
images
[
lX
].
at
<
Tp
>
(
pB
),
images
[
lB
].
at
<
Tp
>
(
pA
),
images
[
lB
].
at
<
Tp
>
(
pB
)
);
double
weightXB
=
dist
(
images
[
lX
].
at
<
typename
Tp
>
(
pA
),
images
[
lX
].
at
<
typename
Tp
>
(
pB
),
images
[
lB
].
at
<
typename
Tp
>
(
pA
),
images
[
lB
].
at
<
typename
Tp
>
(
pB
)
);
graph
.
addEdges
(
X
,
int
(
pB
.
y
*
width
+
pB
.
x
),
weightXB
,
weightXB
);
}
}
...
...
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