diff --git a/img/img_patch.m b/img/img_patch.m index b3918ff7..e46c4bee 100644 --- a/img/img_patch.m +++ b/img/img_patch.m @@ -56,7 +56,7 @@ else % All coordinates are integers - if sum(round(bb)-bb)==0 + if sum(abs(round(bb)-bb))==0 L = max([1 bb(1)]); T = max([1 bb(2)]); R = min([size(img,2) bb(3)]);