1 | initial version |
Using the coordinates you could compute the area of each rectangle and then threshold on it.
a = sqrt((rect_points[0].x-rect_points[1].x)^2-(rect_points[0].y-rect_points[1].y)) b = sqrt((rect_points[1].x-rect_points[2].x)^2-(rect_points[1].y-rect_points[2].y)) area = a*b
if(area>threshold) draw
You should check the index used to compute the width and the height of the rectangle because I'm not sure of the order returned by the function that find rectangles.
2 | No.2 Revision |
Using the coordinates you could compute the area of each rectangle and then threshold on it.
a = sqrt((rect_points[0].x-rect_points[1].x)^2-(rect_points[0].y-rect_points[1].y))
sqrt((rect_points[0].x-rect_points[1].x)^2-(rect_points[0].y-rect_points[1].y));
b = sqrt((rect_points[1].x-rect_points[2].x)^2-(rect_points[1].y-rect_points[2].y))
sqrt((rect_points[1].x-rect_points[2].x)^2-(rect_points[1].y-rect_points[2].y));
area = a*ba*b;
if(area>threshold) draw
You should check the index used to compute the width and the height of the rectangle because I'm not sure of the order returned by the function that find rectangles.
3 | No.3 Revision |
Using the coordinates you could compute the area of each rectangle and then threshold on it.
a = sqrt((rect_points[0].x-rect_points[1].x)^2-(rect_points[0].y-rect_points[1].y));
b = sqrt((rect_points[1].x-rect_points[2].x)^2-(rect_points[1].y-rect_points[2].y));
area = a*b; (abs(x1-x0) * abs(y1-y0));
if(area>threshold) draw
You should check the index used to compute the width and the height of the rectangle because I'm not sure of the order returned by the function that find rectangles.