c++ - Oriented bounding box defined by angle of orientation -
i know how find minimum bounding box using regionprops() in matlab , boundingrect() using opencv. how find bounding box of points (not minimum bounding box) given angle of orientation? example in image below line major axis of rectangle. 
well, there many possible solutions. i'll mention 3 of these:
rotate points red line becomes parallel x (or y) axis; then, find minimum axis oriented bounding box of transformed points; then, rotate box find desired one.
find projection of every point on red line , on blue line (perpendicular red one), storing minimum , maximum values per coordinate.
find distance of points red line; then, consideration should find 2 coords of box; can repeat computation taking line perpendicular red 1 find missing 2 coords box
Comments
Post a Comment