Sunday, February 26, 2012

The Problem of Blur

We've all done it. It's too dark, or we're not steady enough or we've left our camera on some odd settings. Now we've got a blurry picture. Our first instinct is probably to erase it and take another try. That's probably not a bad idea. If that's not an option, however, what can be done?

Unfortunately, the current answer is -- not much.

Software Limitations

Current graphics programs, even the several hundred dollar ones, have limited options for sharpening blurred pictures. Common fixes are Sharpen Gaussian Blur and Sharpen Motion Blur. The first attempts to fix 'soft' images and the latter fixes *single direction* motion.

The problem is, of course, that blur motion is more often little curves, wiggles or at the very least - not a uniform speed.

A more sophisticated approach is being looked at here.

Image Limitations

The second problem, is that blur is destructive - meaning that information is overwritten or mangled. Bright objects leave trails that overwhelm other picture elements. Areas of similar brightness muddle together.

Having the picture taken in RAW mode helps, as all the information is saved. That means that there's no 'averaging' of colours or extra noise from lossy compression.

2D vs 3D

When you're fixing a image, you're working with a 2 dimensional representation of a 3 dimensional space. If you're only changing the brightness or saturation, this really doesn't matter. Blur, however, is a different sort of problem.

Objects that are closer blur differently than objects that are farther away. More or less depends on the type of movement.

To illustrate, next time you're in a vehicle try two different things. First, turn your head about 30 degrees. Closer objects have barely moved at all in your field of view, but things at a distance have. Next move your head a bit to the right (or left if you drive on that side of the road). The opposite has happened -- nearby objects have 'jumped' and next to no change at long distances.

Applying any type of uniform solution will not work - necessitating sections and/or masking to get the best result.

Monday, July 4, 2011

Bigger than Big

One of the side effects of the megapixel race is very large pictures. Both in terms of file size and image dimensions. It's long past the point of practical use - as I've implied in earlier articles.

A 4x6 print @ 300 dots per inch (normal printing quality) requires an image 1200x1800 pixels. Although "requires" is a bit strong of a word - most printers will upscale an image anywhere close to that without much quality loss. In effect it's more of an upper limit - in that providing an image larger than that result in 'loss' of detail - there's more information than the printer can actually resolve. That's sometimes a good thing, if your 'detail' consists of messy jpg artifacts and ISO noise - stuff you can see at 100% zoom of Point and Shoot camera shots.

A 5x7 print @ 300dpi is 1500x2100

8x10 is 2400x3000

And so on. To a point.

The larger you make a print, the less likely you'll be viewing it from close up. Meaning you can get away with less detail.

Digital displays are even more forgiving.

Facebook pictures are 720 pixels x (up to) 720 (if you make it square, which most people don't) EDIT - Now closer to 1000x1000, but not all that much larger.

An average photoframe is 800x480
Most monitors display a resolution around 1680x1050 - though some as high as 2560x1600 are getting more common. The first of the two monitor sizes is very close to the size of a sharp 4x6 print.

Televisions, although large, really only display 1920x1080 pixels worth of information.

Which brings us, finally, to cameras.

An A3000, which is rated at 10MP (rather on the low end as of the writing of this article) has a number of settings.

They are:


Or 10, 6, 4, 2 and 0.3 Megapixels respectively -- a Megapixel is the height and width (in pixels) of an image divided by a million (and usually rounded a bit). It doesn't really address Aspect Ratios but it's handy for a rough comparison.

A T2i has a number of settings as well:


Or, according to the camera - 18, 8 and 4.5 megapixels

I'll indulge in a little math at this point - also with pictures if you want to skip the number crunching.

Assuming a 300dpi print, you can divide the above by 300 to get the 'optimal' print size.


(I'll omit the lowest setting, 640x480 is only slightly smaller than the current FB size, and is a decent size for emailing pictures)

To visualize the above


So, what does this mean? As covered in the last article, storage space isn't really at a premium most of the time. If you have a fairly good idea of what you're going to do with your pictures (and how much will likely be cropped out, or re-sized) you can probably back your camera off *Max* settings though. If nothing else, you'll be able to copy and email your pictures more quickly.

Myself, if it's something in the backyard that isn't moving and I already have quite a few pictures of it, I'll drop down to Medium (8MP) - and probably Normal Quality (previous article) as well. I can still print an 8x10 as long as I use most of the picture. For Facebook, 4x6 prints and general computer viewing - it's more than overkill.

50% File Size - 95% Quality

I've read a few articles on Image Compression. That's where you specify if your camera is taking Superfine, Fine, or Normal quality shots. Different brands (and years) of cameras have different names for this - but it boils down to the same thing.

Most of these articles suggest that, if you have the room, you should *always* set your camera to the highest quality and highest Megapixels. However, most of these articles are at least three years old - which is a very long time ago in terms of technological progression.

Not a lot of them include examples either - which would still be outdated, but at least would give you an idea of what to expect.

Of the few that do give examples, they tend to magnify them to the point where the difference is actually visible (300 or 400%) which doesn't strike me as particularly 'Real World'.

So without further ado....

High Quality above, Lower Quality below.

As you can (probably?) see, the top image is slightly better. The edges of the leaves are sharper, and there is less compression artifacts around the web (which somewhat exaggerated due to motion blur). There is also a bit more dynamic colour range in the top photo. It's also twice(!) the file size.

Is it worth it? This is where most other sites would say 'Yes, if you're going to print it - memory cards are so cheap - go with highest quality'. A few sites will (paradoxically) suggest that you switch to lower quality *when* you start running low on space i.e. when it's already too late. In my mind, having (at least) twice as many pictures for a rather imperceptible change *is* a very good tradeoff - and much better started early.

There's also a psychological advantage to that as well. If you assume that 'Highest Setting' means 'Best Shot', you probably won't take a second picture, even if you probably should. If you have twice as many pictures remaining, it's a lot easier (mentally) to spare the room for a 'Backup Shot' - even if it's the difference between having 2000 pictures remaining or 1000. It's worth noting that some of the pictures were up to 4x smaller on the lower compression mode of the T2i - it varies a lot between cameras and shot content.

When taking the pictures for this article a rather high number 'messed up'. Either they weren't in focus - The A3000 shots (not shown) had half of either pair blurry - so weren't worth putting up. They looked fine on the camera preview. A significant number of the SLR shots had a different area in focus, or motion blur. In not a few shots, the smaller file size shot was noticeably better than the larger. In other words - it was much more likely for *something else* to go wrong, than for compression to mangle the image.

You mileage may vary, especially with an older camera. It's worth looking into though. Memory cards and Hard Drive space *are* relatively plentiful and cheap - but still finite.

Sunday, May 15, 2011

Composition Part II - Ignore What I Just Said

Well, not really.

The previous post contains techniques you probably should keep in mind – but more that when you disregard the suggestions, you do so for a reason and/or with panache.

Never in the middle – except...

The case against putting something in the centre falls apart somewhat if the focus is asymmetrical. The more irregular the shape, the less it seems to matter.

Centred, but not dull

If it's a portrait, or some other controlled environment where the background won't add anything to the shot, then having the primary subject(s) off to one edge may make the picture unnecessarily unbalanced.

Might be an idea for a computer desktop picture, but otherwise...

Depending on your camera/lens, the border of a picture may also suffer from distortion (bending of the image), or vignetting (darkening of the image). I almost hesitate to mention this, as it only really happens at the extreme edges.

Most of the Picture?

As with the above, if the subject is interesting enough, you can probably get away with it taking up most of the space.

Conversely, if the background is dull, it's best to be rid as much of it as possible - especially when using a point and shoot camera - as it will likely be almost in focus as well.

There's a few ways you can get these kind of shots to work.

1) Be creative when cropping the shot. People are used to seeing the whole of something. It also helps to remove the (often dull) outer extremities.

You can imagine what the missing elements look like, so including them is superfluous

2) Keep the flash off. Natural light makes things more dynamic. Work with it, not against it.

You won't get shadows like that with the flash on

3) (D)SLR cameras – Selective focus. One of the biggest strengths of these cameras is to have only small portion of your subject showing detail. You keep the colour and shape, but the eye isn't overwhelmed with where to look.

You're drawn to the leading edge - but cropping it to do so would be severe

Tuesday, May 10, 2011

"Out, damn'd spot!" Dust and Scratch Removal

While the words of Lady Macbeth might be taken somewhat out of context, finding out that treasured photographs (slides or film) have been damaged by age, weather and accidents can be pretty infuriating.

Fortunately though, we live in a time where technology can come to the rescue, sortof. Infrared Scanning can remove dust and scratches automatically though only from semi-transparent original media and it's only a feature on rather expensive scanners. Photo Editing programs usually have a 'Dust and Scratch Removal' filter - but often that ends up as too strong, or not strong enough.

That leaves hours and hours of painstaking manual correction -- or does it?

More recent releases of Photoshop have 'Content Aware' repairing, which does a fairly good job of doing, well, exactly what the name implies. Depending on the exact type and extent of the offending marks, this might be simultaneously overkill (the individual damage points aren't very large) and inadequate (the damage is spread out over the entire photo).

Lots of dust, hair and scratches - everywhere.

As is often the case, there is no *single* solution. Nor is something entirely automated the best way to go. At the same time, unless you only have a handful of photos (and really, how often is that?) you want something that doesn't take too long for each image.

After a *lot* of practice I found a method which strikes a rather comfortable and acceptable balance between time/tediousness and final quality.

It assumes a basic knowledge (and quality) of Photo Editing programs - duplicating layers and creating/using masks - as well as being able to adjust filter settings to produce a desired result. If you are confused over any specific step, please leave a comment, or do a Google Brand Search™ for a more detailed explanation. I'm avoiding specifics here because the exact menus and settings vary a lot from program to program.

1) Start by doing a 'Dust/Scratch Removal' at settings that improve the image somewhat but do not affect the image in undamaged areas.

Scratch Removal on lighter settings removes much of the small stuff, but doesn't touch the bigger damage.

2) Duplicate the lightly repaired layer and do 'Dust/Scratch Removal' again, this time with the goal of removing all the imperfections.

Using the more aggressive settings for dust/scratch removal repairs the picture, but also removes a lot of the detail - even in undamaged locations.

3) Mask the 'over-repaired' layer (Hide all) and selectively reveal it in areas where the spots and scratches are visible. Note the white dots in the mask (far right) in the image below.

Best of both worlds.

Composition - A more interesting photograph

It doesn't take much to pick up a camera, point it at something, and push the shutter button. However, if that's all you're doing, it's usually pretty obvious.

Which isn't to say it's an unforgivable thing. Some subjects are outstanding enough on their own that it's difficult to take a dull picture of them. Or it could be more about capturing the moment than making a work of art. Other times, it's more important *who* is in the picture rather than how (subjectively speaking) 'good' it is.

This usually relegates photography almost exclusively to vacations, specific events and pictures of friends and relatives.

That said, even if that's all you want to do, why not make it a bit more than a simple snapshot?*

*Disclaimer: The opinions expressed are mine, and are only that. If you don't like constructive criticism, you might want to stop reading now. Also, the pictures are also mine, so I'm not tearing down anyone else's work (except by implication).

Rules of Thirds - Simplified

If you take a (potential) picture and divide it into thirds horizontally and vertically, the lines segment the picture into nine pieces. The corners of the centre segment, as well as the 4 dividing lines should be where 'points of interest' are in your photograph.

Or, more succinctly - don't centre stuff.

A rather common 'mistake' in most snapshots is to put the subject as the absolute middle of the picture. While it's a rather good way to make sure said focus is in focus, it's the photographic equivalent of clubbing people over the head saying 'This is what you should be looking at'.

Look at me! I'm in the middle! Look at meeeeeeeeeeee!

The solution is rather simple, as most cameras focus when pressing the shutter down half way. Once focused, continue holding the button down (partially!) and change the direction the camera is pointing - even slightly.

A bit further off centre and the image is less harsh.

Room to Breathe

Another slightly grating habit is to have the subject of the photo take up most of the photo. While this may seem a desirable outcome, there's a few reasons why it isn't:

It's a picture of a flower - and not much else.

First - from a practical standpoint - it makes it terribly difficult to recompose the picture later when cropping. Facebook profile pictures are square, 4x6 prints are 2:3 (clearly rectangle), and 8x10 photos are 4:5 (wide squarish :p). 'Fill' any of these and you'll likely have problems. As I've mentioned before.
Secondly - from an artistic point of view - a picture that's 75% subject tends to be more than a little busy. Negative space is almost as important to a picture as the actual subject - don't skimp. It's also likely violating the 'rule' above and being entirely centred. Last, but certainly not least, it's missing context - where is this in relation to everything else?
Thirdly - from a technical perspective - it really isn't necessary. Cameras take in a *lot* of information. If you're interesting in minuscule detail, like individual eyelashes or the exact weave of clothing, then you might want to fill the frame with your subject - macro photography comes to mind. But otherwise don't be afraid to cram a few more things in.

Under relatively ideal conditions a 12MP (DSLR) camera can take a picture of 50 people at once, leave enough room to show what room they're in, put their names at the bottom AND have enough individual detail to make a passable Facebook portrait for each person in the shot.

Unless you're cropping out a lot of your picture later, or printing at 13x19, you'll lose most of that detail anyway.

A little context for the image helps it out a lot.

My personal 'rule' is no more than 1/3 of the picture as the main subject. There's exceptions to that, but that's another post....

Monday, February 7, 2011

Quick Tips

In the interest of having a 'bite-sized' post and a bit of a review/re-link to my earlier posts - here's a bare bones list of tips for Photography and Photoshop. I'll try and list them from simplest to more advanced.

  1. Shoot pictures in bright light. The more light the better, diffused light if possibly (less harsh shadows)
  2. Learn the different shooting modes. With the exception of the very inexpensive Point and Shoot cameras, there are ways and reasons to control some things directly
  3. Adjust the exposure compensation If you can't shoot in bright light, this does help
  4. Set the White Balance. Or at least know what else you can do about tinted pictures
  1. Sometimes the best fixes are quick Autocorrect is your friend (most of the time)
  2. The next best things are automated You just have to know where to find them
  3. Know what the program can do Part 1 Part 2 With enough time, source pictures and expertise, just about anything is possible
  4. Blending options are a quick way to add some pizzazz