From 2f3ddab1734db7dad237c828322f78f2180d4e26 Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Tue, 13 Sep 2016 09:04:32 -0600 Subject: [PATCH] Update cropfromlandmarks.cpp --- openbr/plugins/imgproc/cropfromlandmarks.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openbr/plugins/imgproc/cropfromlandmarks.cpp b/openbr/plugins/imgproc/cropfromlandmarks.cpp index 13d8cbd..e5e2c35 100644 --- a/openbr/plugins/imgproc/cropfromlandmarks.cpp +++ b/openbr/plugins/imgproc/cropfromlandmarks.cpp @@ -54,8 +54,8 @@ class CropFromLandmarksTransform : public UntrainableTransform QRectF rect(minX - padW, minY - padH, (maxX - minX + 1) + padW * 2, (maxY - minY + 1) + padH * 2); if (rect.x() < 0) rect.setX(0); if (rect.y() < 0) rect.setY(0); - if (rect.x() + rect.width() > src.m().cols) rect.setWidth(src.m().cols - rect.x()); - if (rect.y() + rect.width() > src.m().rows) rect.setHeight(src.m().rows - rect.y()); + if (rect.x() + rect.width() > src.m().cols) rect.setWidth (src.m().cols - rect.x()); + if (rect.y() + rect.height() > src.m().rows) rect.setHeight(src.m().rows - rect.y()); if (shiftPoints) { QList points = src.file.points(); -- libgit2 0.21.4