Rotate a picture by a small number of degrees

12

2

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.

soandos

Posted 2012-01-19T22:11:00.543

Reputation: 22 744

I am not completely clear on what you need, but the perpective tool in Gimp should help the skew part http://docs.gimp.org/en/gimp-tool-perspective.html, and then once you have it even, you could rotate the selection.

– Paul – 2012-01-19T23:04:44.667

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 http://hugin.sourceforge.net/

– Dennis – 2012-01-21T12:40:44.910

Answers

8

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.

Psycogeek

Posted 2012-01-19T22:11:00.543

Reputation: 8 067

12

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.

overhear

Posted 2012-01-19T22:11:00.543

Reputation: 121

45, -45 looks more like 90 – Ryan The Leach – 2018-10-26T04:57:59.337

Unfortunately, "Invalid numbers include: spaces, decimals, ..." – zylstra – 2019-07-09T00:54:52.093

5

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).

Dan Dascalescu

Posted 2012-01-19T22:11:00.543

Reputation: 3 406

1It 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 – 2012-01-20T01:38:41.073

3

If you don't want to download anything - and if skewing isn't an issue - Microsoft Office's picture viewer will allow arbitrary (degree-level precision) rotations.

  • From Window Explorer, right click the image and Open with ... Microsoft Office 20xx
  • Select 'Picture/Rotate and Flip...' from the menu
  • Then, in the right hand pane, you'll notice the 'by degree' text box.

mcalex

Posted 2012-01-19T22:11:00.543

Reputation: 2 315

3

  • In Paint.NET, select "Move Selected Pixels" tool.
  • Select On Mouse Right Click and try moving your mouse left and right.
  • Your image starts rotating.

user205987

Posted 2012-01-19T22:11:00.543

Reputation: 171

1But can you specify to rotate a certain amount of angle, say, 12 deg? – Tom K. C. Chiu – 2018-01-30T13:19:39.677

1

@TomK.C.Chiu, you can also use Ctrl + Shift + Z to pull up the Rotate Zoom Dialog and enter in a numerical value

– KyleMit – 2020-01-06T21:39:23.590

0

I paste my picture into excel, remove the view of the gridlines and the n click on the picture. This will come up with a rotating icon up the top allowing you to maneuver it however you want. When complete I take another screen shot of it and your done. Sometime it won't be an exact degree you want and if this happens I take the screen shot, past and try again as it may split the difference.

Steven

Posted 2012-01-19T22:11:00.543

Reputation: 1