mirror of
https://github.com/opencv/opencv.git
synced 2026-09-13 05:42:51 -05:00
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
This commit is contained in:
@@ -46,7 +46,8 @@ float calcDistance(const Rect& a, const Rect& b)
|
||||
{
|
||||
Point2f p_a((float)(a.x + a.width / 2), (float)(a.y + a.height / 2));
|
||||
Point2f p_b((float)(b.x + b.width / 2), (float)(b.y + b.height / 2));
|
||||
return sqrt(pow(p_a.x - p_b.x, 2) + pow(p_a.y - p_b.y, 2));
|
||||
Point2f diff = p_a - p_b;
|
||||
return sqrt(diff.dot(diff));
|
||||
}
|
||||
|
||||
float calcOverlap(const Rect& a, const Rect& b)
|
||||
|
||||
Reference in New Issue
Block a user