update condition for merging images

This commit is contained in:
Clarissa.Dietrich 2021-04-21 16:58:24 +02:00
parent 7b6a12da86
commit f3785ee4f4

View File

@ -248,7 +248,7 @@ public class PdfSegmentationService {
double height2 = image2.getPosition().getHeight();
//if the x-coordinates and widths of images are equal and the height is equal to difference between y-coordinates,
// then it is the same picture and has to be merged -> return true
return x1 == x2 && width1 == width2 && Math.ceil(height2) == Math.ceil(y1 - y2);
return x1 == x2 && width1 == width2 && Math.ceil(height2) == Math.ceil(y1 - y2) && width2 > (height2 / 6);
}