Skip to content

Commit

Permalink
[software] PanoramaCompositing: add graphcut border check
Browse files Browse the repository at this point in the history
  • Loading branch information
servantftechnicolor authored and fabiencastan committed Sep 7, 2020
1 parent 4261db2 commit 585a725
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 585a725

Please sign in to comment.