Rotate an image after applying a filter
Well I have the next question, after applying a detection filter (like Sobel or Canny) in the y coordinates, I want to rotate the image until the detected border it is horizontally.
How can I do it??
Thanks.
Can you explain your problem clearly? may be with a picture?
Do you want to know how you can compute the rotation angle or do you want to know how to rotate the image? (Solution for second task is getRotationMatrix2D / warpaffine )
I mean, for example, I have a rotated square like a diamond , and I want to have the square in a original position as you can see your laptop's screen for example, http://pullmonkey.com/tag/gems/ and the result I want http://jwilson.coe.uga.edu/emt725/SqT.... So the first step I think is the best one is detect the borders of the image using a filter and after rotating the image basing on, for example, the left border. and putting it vertical to the bottom of the screen.