Time to be with your loved ones

Time to be with loved ones

by sat

submit your photo


Hall of Fame
View past winners from this year

Please participate in Meta
and help us grow.

Take the 2-minute tour ×
Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. It's 100% free, no registration required.

I was wondering if there was any photo management software out there that could auto detect and "rate" images on how in focus they are. This comes up for me quite commonly when i am looking through a large series of macro images of the same subject.
In a perfect world, light room (or whatever program) could highlight in focus and out of focus ares the same way that it detects burned out areas of an image. Also the algorithm i am hoping exists would be smart and would not be detracted by blurred backgrounds and only seeks that some sufficient area is in enough focus.
Anything like that out there?

As another thought for people talking about pictures being in focus on the wrong spot, and that camera focus models already look into this. Another large factor for a lack of clarity in a macro image is blur from camera movement. This damages all points on an image, and is not something the camera accounted for when focusing.

share|improve this question
    
Good question, been wondering this myself. –  SpikeX Jan 20 '11 at 22:32
    
Which camera are you using? Some cameras include the focus point information in their RAW files and EXIF data, with a little effort, it wouldn't be too difficult to use that information to gauge the sharpness and contrast to determine a rating of focus. I don't know anything that does this though... –  Benjamin Anderson Jan 20 '11 at 22:45
2  
@Benjamin Anderson - this is only a partial solution. Usually you focus then recompose, so the focus point indication will actually be misleading in this case and will rate many perfect images as out-of-focus –  ysap Jan 20 '11 at 22:47
1  
@Jukka what you're asking for is called colour peaking and it's found on high end digital video cameras (which are often manually focussed). I believe you can get it on the Canon 5D mkII via the Magic Lantern firmware hack. –  Matt Grum Jan 21 '11 at 12:11
1  
@gerikson, why the snark? That's what computers are for - automating tasks. It's a perfectly reasonable request. And how does one learn to take those "better pictures"? By taking lots of pictures. Practice is valuable. –  Reid Jan 21 '11 at 14:10
show 4 more comments

3 Answers

up vote 11 down vote accepted

It's an interesting question. It's certainly possible for software to detect the parts of an image that is in focus, as it's the basis for focus-stacking software like Helicon Focus.

Focus stacking is a technique used by macro photographers. The depth of field in many macro shots is very shallow, so to extend this it's possible to take a set of photos of the subject, modifying the focal point in each one. Helicon Focus takes the stack of photos and detects the most in-focus parts of each image, and blends them together to produce a result where the entire subject is in focus. It's also possible to do this with some of the technology behind Hugin, but it's a bit more tricky to set up.

I think the difficulty in extending this for a general "in focus" check would be determining whether the subject is in focus - how do we automatically determine what the subject is? How much depth of field was required by the photographer?

share|improve this answer
    
I think the need for control over the camera's autofocus system demonstrates that it's impossible to know, without the photographer's input, what the intent is. There's also a sort of Godel problem, where I can take an out-of-focus picture on the wall, and take a picture of it, that is itself correctly focused. It would be impossible to identify the latter as being correct. –  Chris Wuestefeld Apr 11 '12 at 13:58
add comment

What you are asking for is problematic in the sense that a software based focus detection will essentially use the same algorithm as a contrast based camera autofocus system uses. That means that you need to scan the image and look for the most contrasty place to determine the amount of "focusness". However, it is possible you were shooting a low-detail (low-contrast) subject, so even though your focus is spot-on your target, still the software algorithm will determine a low focus or out-of-focus image.

Additionally, how will the software know what was your actual intended focus point? If you're shooting a portrait, and the eyes are mis-focused, the software will detect perfect focus on the ear, but this really is a low-quality or unusable image.

share|improve this answer
1  
I'm starting to see how it's possible to design such a program. For faces, well, do a facial recognition type program, look at the eyes and see if they are in focus. Something should be possible for this, although it might be somewhat difficult... –  PearsonArtPhoto Jan 20 '11 at 22:55
    
Well, the proposed technique (highlighting areas that seemed to be in focus) would not have the problem of ear vs. eye. I'd guess that seeing which areas are relatively contrasty vs. not contrasty would be similarly interpretable - and if you're concerned with a series of similar images, then comparing them to each other rather than an absolute "focusness" quality seems like the right way to do it. –  Reid Jan 21 '11 at 14:12
    
@Reid - I assume the intent of the OP is to have an automated process for removing bad pictures. My answer addresses this requirement by pointing out why this feature will be hard to accomplish, and I also gave examples in comments to other answers. If there is a human in the loop, then everything is possible... –  ysap Jan 21 '11 at 16:52
    
My reading of the question is that the OP does seem to be pretty clearly describing a mixed initiative process, not a fully automated one (e.g., "highlight in focus and out of focus ares"). –  Reid Jan 22 '11 at 23:16
add comment

As a human, I would rather rate them myself with my subjective observation, seeing as I know where the focus should or shouldn't have been, but I suppose there could be a rough way to determine the focus quality of a shot based on the aperture, focal length, subject distance and focus/unfocused areas of the image.

For example, long focal length, small aperture, close subject means there is likely to be a small point of focus with a lot of bokeh (for common applications of this recipe).

On the other hand, short focal length with a longer subject distance means there's likely to be more in focus areas than out of focus areas (think landscape or group shot).

I guess the most important thing in any photo is, wherever the most focused area of a photo is, it's in focus. This simple "is the most focused point in focus" check would be one I could possibly use as there's most commonly no point in using an out of focus or back-focused shot unless you think it will work.

share|improve this answer
    
your last point is only partially true, as most of the time you will focus and then recompose. Like the example I gave in other comment, it can be that the ear will be in perfect focus (and as such your image will have great most focus point) but the eye will be OOF. –  ysap Jan 21 '11 at 0:23
    
I didn't even think of that, and yes, I very often focus and recompose, so there could be a slight shift in the focus plane. –  Nick Bedford Jan 21 '11 at 3:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.