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. enter image description here

well, there many possible solutions. i'll mention 3 of these:

  1. 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.

  2. find projection of every point on red line , on blue line (perpendicular red one), storing minimum , maximum values per coordinate.

  3. 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

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -