GroupContoursPipe optimization

This commit is contained in:
Banks Troutman
2019-11-27 18:16:00 -05:00
parent c5f2a90f86
commit 221af540b2
2 changed files with 2 additions and 1 deletions

View File

@@ -41,7 +41,7 @@ public class GroupContoursPipe implements Pipe<List<MatOfPoint>, List<RotatedRec
groupedContours.clear();
if (input.size() > 0) {
if (input.size() > (group.equals(TargetGroup.Single) ? 0 : 1)) {
List<MatOfPoint> sorted = new ArrayList<>(input);
sorted.sort(sortByMomentsX);