I have an image filled with objects and I am able to draw bounding boxes around them, thanks to the minAreaRect function.
Those rectangles are rotated. I want to retrieve images, containing only the inside of the rectangles that would be rotated by its angle, so that all objects are oriented upwards.
I know I have some functions to do so : getRotationMatrix, warpAffine, etc. The problem is that I still haven't found the process to have my results. Some steps are needed, such as : setting the rectangle on the center of a fixed-size image, rotate it, and then crop what I want. But it's not as easy as it seems...
Has anyone ever done this before ? Any help would be appreciated. :) Thanks !