Rotate an image after applying a filter

asked 2015-01-02 06:24:26 -0600

spinter696 gravatar image

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.

edit retag flag offensive close merge delete

Comments

1

Can you explain your problem clearly? may be with a picture?

Balaji R gravatar imageBalaji R ( 2015-01-02 10:16:25 -0600 )edit
1

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 )

FooBar gravatar imageFooBar ( 2015-01-02 11:24:38 -0600 )edit

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.

spinter696 gravatar imagespinter696 ( 2015-01-11 12:15:55 -0600 )edit