How to find out if rect is inside another rect ?
Hi guys, is there any method in opencv to check if rect is inside another rect ? thanks.
Hi guys, is there any method in opencv to check if rect is inside another rect ? thanks.
in c++, there is an "intersection" operator:
Rect a(20,20,40,40);
Rect b(30,30,40,40);
Rect c = a & b;
// [30 x 30 from (30, 30)]
(if the intersection is empty, they do not overlap)
if you want to find out, if Rect a is completely inside Rect b, it is:
(a & b) == a;
so to check if a rectangle is inside other rectangle, what should i do ?
Asked: 2018-04-15 02:38:13 -0600
Seen: 8,637 times
Last updated: Apr 15 '18
How to remove detected human after DetectMultiScale?
Calc a bounding box with a binarized image?
How to cut an image in small images with opencv !!!
Estimation of 4-point Polygon in Contour
How pass Rect from Java code to Jni?
How to Shift a rect by a certain offset in openCV4Android