Saturday, November 1, 2003

Megapixels and cropping

YOUR FIRST DIGITAL CAMERA

By David Gewirtz

No discussion of digital cameras (or any camera) can really be complete without talking about cropping. In this helpful article, I'm continuing my discussion of digital pixels with tips for how to plan for cropping in your digital camera purchase. This is a continuation of last week's article, "What the heck is a megapixel," at http://www.computingunplugged.com/issues/issue200309/00001105001.html. If you haven't yet read that article, it's probably a good first stop before continuing on here.

Let's talk about cropping. This is best illustrated with a photograph, like that in Figure A.

FIGURE A

This is a raw, unretouched image straight out of a camera. (click for larger image)

I took this image at Mystic Seaport, and it's unretouched, which is why it's got all the scratches and such still on it. As a good photographer, I know that the closer I get to my subject, the better the picture often becomes. It's an easy photographer's trick, and it works.

So, I'm going to want to crop the image down, as shown in Figure B.

FIGURE B

You can see the area I want to crop. (click for larger image)

You can see, in the red square, the area I want to crop. By the way, the actual image you're looking at in the article is 640 pixels wide. If I cropped the image, and then wanted to still display it at 640 pixels wide, you'd get the blurring effect you see on the left side of Figure C.

FIGURE C

You can see the effect of resolution on cropping. (click for larger image)

What happened was there were only so many pixels, so when I enlarged the image to fit into the 640 pixel wide area I'd decided on, the image blurred out. What's really happening is that the computer doesn't have any original data to fill the space, so it "interpolates" the existing pixel data to approximate the pixel color between the two for which there is data.

You can see that particularly clearly in the window on the left, highlighted in blue.

By contrast, the image on the right side remains clear. Again, compare the windows. That's because I had extra pixels available, and so when I resized the image, I didn't lose any image quality -- and the computer didn't have to make any guesses as to what the picture ought to look like.

Once again, my photographer's vanity needs to remind you that this is an unretouched, raw picture. I haven't done my usual Photoshop magic to make it beautiful. You can see some of my finished images at my personal site, at http://www.gewirtz.com.

Let's talk about the relationship of cropping to megapixels. Earlier, we'd talked about the size of the print you're looking at creating. If you wanted to create a 5x7 print, I said a 2 megapixel camera would be fine. Likewise, if you wanted to create an 8x10 print, a 3 megapixel camera ought to be fine.

But now, let's assume you want to crop an image, and still bring it up to 8x10. Let's assume you want to crop a 5x7 area and bring that up to 8x10 inches. How would you figure out what camera you'd want?

Again, it's math. If the picture is ultimately going to be 10 inches across, printed at 220DPI, you're going to want to need at least 2,200 pixels across the image. Likewise, you're also going to need to have 8 inches times 220 dots, or 1,760 dots down the image.

But you want to scale up that 5x7 area into the 8x10 image. In a sense, you need to have a camera that can take considerably more than 3 megapixel images because the usable picture data is only in the middle. In fact, about 50% or so of the actual picture will be wasted. Calculating it out, 7 goes into 10 about 1.5 times. 5 goes into 8 about 1.6 times.

So, rather than the 2,200 pixels across the image and 1,760 down, you really need 3,300 pixels across (that's 2,200 times 1.5) and 2,816 pixels down (which is 1,750 times 1.6). Multiplying out 3,300 times 2,816, we get a whopping 9,292,800 pixels, or what is really a 10 megapixel camera.

This is why professional photographers and photographic artists are still using film, or are using very high-end cameras. In your case, depending on your quality requirements, you could cheat by reducing the print quality and seeing what turns out right.