Can pixels be used in determining optimum focus?

PJ
Posted By
Peter Jason
Feb 5, 2007
Views
385
Replies
4
Status
Closed
I photograph buildings with an Olympus E500
and I use autobracketing with the focusing.

This works OK and normally I have no trouble
choosing the best focused shot.

But some times it is hard to choose the
better of two photos on the screen, and I
wonder that if I enlarge the photos up to
pixel level, I can rapidly choose the
sharpest shot.

I have done some tests in comparing two
bracketed-focus tests and it seems that for
the sharpest focus the pixels making up, say,
a small highlight has fewer and brighter
pixels.

Is this always true, and has anyone else had
this experience?

Peter

Must-have mockup pack for every graphic designer 🔥🔥🔥

Easy-to-use drag-n-drop Photoshop scene creator with more than 2800 items.

MR
Mike Russell
Feb 5, 2007
"Peter Jason" wrote in message
I photograph buildings with an Olympus E500 and I use autobracketing with the focusing.

This works OK and normally I have no trouble choosing the best focused shot.

But some times it is hard to choose the better of two photos on the screen, and I wonder that if I enlarge the photos up to pixel level, I can rapidly choose the sharpest shot.

I have done some tests in comparing two bracketed-focus tests and it seems that for the sharpest focus the pixels making up, say, a small highlight has fewer and brighter pixels.

Is this always true, and has anyone else had this experience?

Yes, this works because the spot will be brighter if it is focused more sharply. Use a dark pixel for an even more sensitive test – the darker the pixel the sharper the focus, because less extraneous light is spilling over into the dark area.

Mike Russell
www.curvemeister.com/forum/
A
Alex
Feb 6, 2007
"Mike Russell" wrote:
"Peter Jason" wrote in message
I photograph buildings with an Olympus E500 and I use autobracketing with the focusing.

This works OK and normally I have no trouble choosing the best focused shot.

But some times it is hard to choose the better of two photos on the screen, and I wonder that if I enlarge the photos up to pixel level, I can rapidly choose the sharpest shot.

I have done some tests in comparing two bracketed-focus tests and it seems that for the sharpest focus the pixels making up, say, a small highlight has fewer and brighter pixels.

Is this always true, and has anyone else had this experience?

Yes, this works because the spot will be brighter if it is focused more sharply. Use a dark pixel for an even more sensitive test – the darker the pixel the sharper the focus, because less extraneous light is spilling over into the dark area.

Mike Russell
www.curvemeister.com/forum/

If I may join in: this is a subject I have been interested in for some time.

I have been wondering how digital camera’s determine the best focus: they don’t have more information than is present in an image. Is there a way to do that on the computer? I have found some articles about it but they weren’t fit for an amateur like me.

My idea was to find a filter that you can apply to an image in Photoshop and that results in (for example) highest contrast for the sharpest image. As if you look at the derivative of a function and you want to find the steepest slope by looking for the highest value in the derivative. But I don’t have a solution to this…

Someone have an idea?

Greetings, Alex
MR
Mike Russell
Feb 6, 2007
"Alex" wrote in message

[re determining focus via pixel values]
If I may join in: this is a subject I have been interested in for some time.

No problem.

I have been wondering how digital camera’s determine the best focus: they don’t
have more information than is present in an image. Is there a way to do that on
the computer? I have found some articles about it but they weren’t fit for an
amateur like me.

Yes, computers are very good at this sort of thing. First, it’s worth mentioning that SLR’s solved this problem many years ago. It was my pleasure to sit next to one of the early engineers involved in Honeywell’s development of the first SLR autofocus circuitry, and the technical details are quite interesting. Digital SLR’s inherit this technology, and are lightning fast compared to the point and shoot cameras, which rely, as you say, on pixel data.

My idea was to find a filter that you can apply to an image in Photoshop and
that results in (for example) highest contrast for the sharpest image. As if
you look at the derivative of a function and you want to find the steepest slope by looking for the highest value in the derivative. But I don’t have a
solution to this…

Of course computers have a large number of options.

One solution is to use a subset of the Unsharp Mask algorithm. Subtract the image from a blurred version of itself. A sharply focused pixel will result in a larger result. Run auto-levels on it, and voila, you have a mask that is brighter where the image is sharpest. This can be used, for example, to generate a mask for each layer of a multi-focused set of images, and mask for the sharpest portion of each. The result is an image that contains the sharpest parts of each, for a wide depth of field effect.

Another is to calculate the standard deviation of a finite area around each pixel. The larger the standard deviation, the sharper the image. A variation of this is used to calculate the Modulation Transfer Function, or MTF, which is a numeric characterization of the resolution of an imaging system.

FFT’s are probably the best method of all for determining sharpness, since it is a direct measure of the spatial frequency component of the image, but now I’m starting to see what you mean about all these articles getting too technical – heh.


Mike Russell
www.curvemeister.com/forum/
A
Alex
Feb 7, 2007
"Mike Russell" wrote:
"Alex" wrote in message

[re determining focus via pixel values]
<snip>

Many thanks for your response – I have something to think about now ! Greetings, Alex

How to Master Sharpening in Photoshop

Give your photos a professional finish with sharpening in Photoshop. Learn to enhance details, create contrast, and prepare your images for print, web, and social media.

Related Discussion Topics

Nice and short text about related topics in discussion sections