When shooting a rectangular object there is a common distortion problem that is often seen in pictures of aquariums. The sides, the top and bottom lines of the tank appear tilted or bowing. That problem is a result of zooming the camera lens to a length that renders the straight lines as crooked. The simplest fix would be to zoom the lens to a "normal" length (50 mm for 35 mm. film photography) and retake the picture. But that is not always possible due to the space available in the room or other reasons.
If you want to straighten the lines using Photoshop you can use the "Distort" function. The process is very straightforward and takes very little time. I'm going to use Luis Navarro's 75 gal. tank so I can pretend that I'm improving the work of the master. This is the original picture which we will manipulate:
First we will select the area that we are going to work with. For this use the Rectangular Marquee Tool to draw a rectangle around the tank:
Then select the "Distort" function from the menu. This fucntion allows you to alter the image to your liking - even "flipping it over" if you wish:
Upon selecting the "Distort" function 8 small squares will appear on the selection frame. 4 are in the corners and 4 are in the middle of each side. You can use them to "get hold" of the image and distort it - that's why they are called "handles":
Drag the top left handle to the right and you will see how the tank side starts to slope. Don't overdo that because the tank may break. That's a lame joke but the idea is clear - dragging the handle allows you to change the shape of the tank:
You can do the same in the opposite direction - dragging to the left:
After you learn how to use the Distort function and play with it for a while you may find it hard to align the sides of the tank to perfectly vertical. There are no guides to show you what is perfectly vertical (or horizontal for that matter). Instead of trying to draw lines on your screen with a marker make use of the "Rulers" that are available in Photoshop. They are basically vertical and horizontal lines that help you with the alignment. To display them use the View | Rulers menu. (To hide them go back to the same menu and uncheck the check mark to the left of the word "Rulers"):
Two white rulers appear as shown below:
The white rulers can be used for measuring the image, but in our case we are interested in having some vertical and horizontal guidelines. The Rulers have Temporary and Permanent guidelines.
To display the Temporary lines drag the rectangle shown in the picture below to the right or to the bottom. The guidelines appear, but they evaporate as soon as you release the mouse button. Temporary lines... good for quick reference:
To display the Permanent guidelines drag the side or the top Ruler. This time the guidelines will stay superimposed over your image after you release the mouse button:
To move the guidelines select the Move tool and place the mouse cursor over the line. The cursor will change to a double line showing you that it has "sensed" the line and you are all set to move it.
Move the vertical guideline closer to the side of the tank. That way when you start to Distort the side you can use the guideline as a closely positioned reference line:
In the picture below I've added an additional vertical guideline on the right (yes you can draw as many guidelines as you wish). Use the handles to distort the sides and align them with the two vertical guidelines.:
To accept the new changes you need to "Apply" them. Hit the "Enter" key to do that. If you go ahead and try to select another tool before applying the changes Photoshop will ask you to apply or to cancel the new distortion.
The horizontal guideline shows that there is another small problem with the lines. The top of the tank is not perfectly horizontal. Use the top right handle to pull the right side a little bit up:
Adjusting the horizontal line leaves us with a nice leveled tank top but with some extra black background sticking out:
To fix that I've resorted to a cheap trick that you may or may not want to learn. I use the Rectangular Marquee Tool to select the area that should be white. This tool selects in a perfect vertical and horizontal way so the straight line is guaranteed. After the selection I use the "Brightness/Contrast..." dialog (found under Image | Adjustments) to dodge the selected area to innocent white. You can see the settings for Brightness and Contrast on this picture:
This is the finished adjusted picture of the tank:
And here's a comparison of the original and the adjusted tank:
As you see the whole process is very easy. I hope that we will see fewer unadjusted tanks in the future planted tank contests.
If someone has an idea how to fix bowing lines please chime in.