Focus shown graphically? - Feature Requests - CHDK Forum  

Focus shown graphically?

  • 4 Replies
  • 3332 Views
Focus shown graphically?
« on: 28 / March / 2009, 03:19:55 »
Advertisements
Hello

I am using my G9 for photographing static subjects where I need really critical focus. I find the enlarged area in the centre of the display in manual focus mode not really adequate to find the best focus setting. Focus bracketing is a possibility, of course, but I would prefer a method of more accurately focusing to start with.

It occurs to me that it would be really nice if the enlarged area could be replaced by a graph showing the levels across a short row of pixels across the centre of the sensor (or even better a selectable area). Manually adjusting the focus to achieve the highest peaks and lowest troughs in the graph would result in as near perfect focus as possible.

Has anyone implemented this, please, and if not would it be possible?

Regards

Andrew

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Focus shown graphically?
« Reply #1 on: 28 / March / 2009, 08:41:51 »
Not that I know of, but sounds feasible.

We do have access to the live view image. I'm not sure how the manual focus mode enlarged area is handled (i.e. if it's just a portion of the normal viewport we use for zebra, histogram and motion detector or if it has an overlay of its own that needs to be found).

The ARM processor we have access to is rather slow and doesn't have much RAM, but keeping its limitations in mind arbitrary image processing activity is possible, especially on a strictly limited section of the viewport and especially if it doesn't have to update very quickly. There has been some discussion about auto focus algorithms in the past on these forums, btw.

The limiting factor here is likely image quality (the live view image is not that good, especially if there's not enough light). I have no clue of suitable algorithms, the same one might not be suitable for all scenes?

Re: Focus shown graphically?
« Reply #2 on: 28 / March / 2009, 17:20:37 »
The limiting factor here is likely image quality (the live view image is not that good, especially if there's not enough light).

Thanks, Fudgey, I suspect that you have hit the nail dead centre on the head here, and that this is why my suggestion probably would not work in my circumstances, even if such a facility did exist.

I am normally working indoors in such poor light (typically requiring around a 4 second exposure) that the camera's autofocus is not reliable, and that is why I would prefer to focus manually. Presumably it is for the same reason that I also find the manual focus enlarged area difficult to use, and on reflection I suspect that by the same token noise levels in the live image would make it unlikely that my suggestion would work.

So I must take a different approach. Because I can almost always accurately measure the distance between the camera and my subject matter, I intend to equate the possible range of set_focus distances (576 to 65535 on the G9 at full telephoto) to actual distances. To make life easy in doing this I propose to mount a supplementary close up lens over the G9's lens and photograph along the length of a steel tape measure at different values of set_focus. If I know (a) the angle between the camera's optical axis and the tape measure, and (b) the strength of the close up lens in dioptres, it is a matter of simple math to calculate the true distances the camera would be focused on without the supplementary lens. I can then create a table or graph of set-focus values against camera to subject distances.

Does this seem reasonable?

Regards

Andrew

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Focus shown graphically?
« Reply #3 on: 29 / March / 2009, 04:56:09 »
So I must take a different approach. Because I can almost always accurately measure the distance between the camera and my subject matter, I intend to equate the possible range of set_focus distances (576 to 65535 on the G9 at full telephoto) to actual distances.

CHDK provides a subject distance OSD which I believe is what you're after, especially after you select 'subject distance from lens'. I don't know how accurate it is, but if I read the source code correctly, this comes quite directly from Canon firmware functions GetCurrentTargetDistance() and GetFocusLensSubjectDistanceFromLens(). I can only assume Canon knows this relation and has a lookup table or an equation already done for you.



Re: Focus shown graphically?
« Reply #4 on: 30 / March / 2009, 17:02:18 »
Thanks again, Fudgey, but I quite fancy having a go at establishing the values for my camera empirically. If I come up with anything meaningful I will post the results here just in case they are of any use to anyone else out there.

Regards

Andrew

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal