TD-e.com

TD-enotes title image


Tutorial to correct slanted horizon lines


To the download page of the script "Correct Horizon"

space-filler
space-filler

Taking the photo on the left, we will correct it using the Gimp and the script "Correct horizon" to obtain the photo on the right.
original photo arrow corrected photo


1. Take the rectangular selection tool.
2. Click on the horizon line at the position of the 1st cross (red). [See the picture below].
3. Drag to the position of the 2nd cross (yellow).
4. Release the mouse button.
5. Run the script "Correct Horizon" at Layer/Transform/Correct Horizon...

how to place the selection frame to correct horizontal axes

Using the script "Correct Horizon" you can also correct slanted vertical axes, like a tall building. The method is exactly the same: place a rectangular selection frame before calling the script.

how to place the selection frame to correct vertical axes

Highest precision

For a higher precision, you should display your photo at 100% of its size or even zoom in at 200% or 400%. The more precisely you click on the line that should be horizontal, the better the result. It doesn't matter if you do not see the complete photo at once because of a high zoom. If you reach the border with the mouse while dragging to set your point, the image will scroll automaticaly. The longer the distance between your 2 points, the better.

Measuring tool

Indeed it would be more logical to let you take the measuring tool to place 2 points on the axis that must be corrected, instead of using the rectangular selection tool. The reason why you must take the rectangular selection tool is that the measuring tool is not (yet) able to forward its result into a script-fu, while the selection tool is.

With or without

Without the script "Correct Horizon", you would have to guess the rotation angle needed, by using the trial and error method, going forth and back several times. Further you would have to place a cropping frame by hand to get rid of the slanted edges due to the rotation.

With the script "Correct Horizon", the angle of rotation is determined by the diagonal of the selection frame you place on the photo. If the angle of this diagonal with the horizontal is less than 45° this will be the angle used for the rotation. If the angle of the diagonal of the selection frame with the vertical is less than 45° that will be the angle used for the rotation. You only need to choose the direction of the rotation in the script i.e. clockwise or counter-clockwise.

Cropping

The cropping frame calculated by the script keeps the original aspect ratio of the photo.

The check-box "crop image" lets you choose if you want the script to crop the image immediatly or if you prefer to see the selection frame the script did calculate for cropping.

If you do not check the box "crop image", the result will be like on the image below. You can still crop it afterwards using the menu Image/Crop image
result with unckecked box crop image

Screenshot of the script

the script correct horizon

Download

Link to the download page of the script "Correct Horizon". The script is available in english, french and german.



Main |  Software |  Photo |  Quiz |  Reviews |  Tips |  Tutorials |  Flags |  Contact |  Privacy |  Terms |  About


Page tested with Opera, Chromium, Epiphany, Firefox, Konqueror, Midori, Seamonkey.
Copyright © 2005-2024 td-e.com, All rights reserved.
.... ....
... ...
.. ..
. .