Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sometimes when I take a picture of a rectangular object, it comes out rotated by a small number of degrees (less than 5 or so).

I can make the space where the rectangle isn't white or whatever, but how can I select a non-rectangular (in the sense that it does not line up with the four ninety degree angles that I am given when I use a rectangular select tool), and rotate it by this small number of degrees?

Additionally, if I could "stretch" one end of the rectangle because it got skewed to match the height of the other one, that would be great. I realize that there will be some loss of resolution if it do it this way (though just as good would be a way to "compress" the other side, and that would not reduce the quality of the image).

I am pretty flexible on the program (GIMP, Paint.NET, Paint, and Visio), but I am open to downloading any free software that can do this.

share|improve this question
    
I am not completely clear on what you need, but the perpective tool in Gimp should help the skew part docs.gimp.org/en/gimp-tool-perspective.html, and then once you have it even, you could rotate the selection. –  Paul Jan 19 '12 at 23:04
    
Probably unrelated but info that should go with this answer. When you said "match the height of the other one" it made me think that many people run into this problem when trying to stitch photos together (for example a panoramic view). There is one software which is specialized for this purpose and I absolutely love. It is the Hugin Panorama Photo Stitcher hugin.sourceforge.net –  Dennis Jan 21 '12 at 12:40

3 Answers 3

up vote 5 down vote accepted

In GIMP, select the whole picture or crop of the picture. Select the "Perspective Tool" (menu Tools -> Transform Tools -> Perspective), and adjust the skew , and rotations (see rotations next) by adjusting each of the 4 corners as needed. In GIMP 2 you can do this live and see the results, then hit transform to finish.

For small rotations, and better control of just the rotate, before or after adjusting the skew, use the "Rotate Tool" (menu Tools -> Transform Tools -> Rotate), which can again be rotated live, then transformed and has entry box for small rotation adjustments.

share|improve this answer

Irfan View is free and can rotate by up to 0.01 degrees.

However, since you mentioned stretching one end of the rectangle, it sounds like you're beginning to see the issues of camera lens distortion. Have a look at this page on barrel distortion - the examples really are worth 1,000 words (disclaimer: I'm the author of the page).

share|improve this answer
2  
Facinating (really!). I had no idea about this. Thank you. –  shufler Jan 19 '12 at 23:57
1  
It is not so much camera distortion as the camera was held at the wrong angle when the picture was taken. Very interesting article though. –  soandos Jan 20 '12 at 1:38

You can rotate by degrees in Paint by using the Skew command. Click Resize, and place a value in the horizontal and vertical fields.

To maintain the look of your image, use equal values, one negative and one positive.

For example:

Horizontal=10, Vertical=-10.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.