Skip to content

Commit

Permalink
Merge pull request #876 from alicevision/dev/debugGraphcut
Browse files Browse the repository at this point in the history
[software] PanoramaCompositing: add graphcut border check
  • Loading branch information
fabiencastan authored Sep 8, 2020
2 parents 9a7e364 + 585a725 commit 268bd5b
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/software/pipeline/main_panoramaCompositing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1384,16 +1384,10 @@ class GraphcutSeams {
rect.h = input.Height() + 1;

/*Extend rect for borders*/
if (rect.l > 0) {
rect.l = rect.l - 3;
rect.w = rect.w + 6;
}

if (rect.t > 0) {
rect.t = std::max(0, rect.t - 3);
rect.h = rect.h + 6;
}

rect.l = std::max(0, rect.l - 3);
rect.t = std::max(0, rect.t - 3);
rect.w = rect.w + 6;
rect.h = rect.h + 6;
if (rect.t + rect.h > _owners.Height()) {
rect.h = _owners.Height() - rect.t;
}
Expand Down

0 comments on commit 268bd5b

Please sign in to comment.