I have a question regarding rotating blobs in an image. The scenario will be that an image has got several rectangular objects oriented in different directions and I need to rotate these objects, so that they align with horizontal. I started off with blob detection and there by calculating the corners of each blob. My idea would be to calculate the angle to be rotated and transform each pixel by the that angle and store it a 2d array.
Is there an easy way to rotate a blob and read the pixel data into a 2d array?
Any help would be appreciated.
[Non-text portions of this message have been removed]