Ask Your Question

Revision history [back]

Your problem is simple, if you look at the groupRectangles criteria. There is the eps parameter which you have set to 0. This last parameter to groupRectangles is epsilon ‘eps’, which controls how much overlap is required in order to merge rectangles. Standard it means that two rectangles need to overlap 20%. However in your case they do not need to overlap at all, which means that your biggest rectangle will always end as the final result.

How it is done in detail can be seen here!

Your problem is simple, if you look at the groupRectangles criteria. There is the eps parameter which you have set to 0. This last parameter to groupRectangles is epsilon ‘eps’, which controls how much overlap is required in order to merge rectangles. Standard it means that two rectangles need to overlap 20%. However in your case they do not need to overlap at all, which means that your biggest rectangle will always end as the final result.

How it is done in detail can be seen here!

I am pretty sure that demanding an overlap of like 0.85 would do the trick here!