Why not just focus at hyperfocal distance ?
Everything from half that distance to infinity will be in focus.
um... Oh... then yes, I want to focus at hyperfocal distance.
That will be even better I think (but the stuff I want to see is pretty much 100 to 5000 meters away). So how can I easily set focus to the hyperfocal distance? I still need the focal length table to calculate hyperfocal distance, yes? Looking at the equation now.. doesn't look too bad, but then I need to query aperture (with get_tv()?) to calculate F-value, and then I have to figure out how big my circle of confusion is somehow... (feels pretty close to infinite right now
)
Despite the name, focus_len_table contains the focal lengths for zooming not setting subject distance (focus).
Sorry I didn't clarify. I realized that, I was just going to use it to calculate infinity, much as
a DOF post I read was doing for the SX20.
set_focus(65535) will set infinity (provided you are in manual focus mode).
I thought that was the case, until I got back values that were twice as high as infinity.
I was setting focus to 65535 with no zoom and it seemed to work fine, but when I was all the way zoomed on the SX30, that 65535 didn't get me to infinity. When I manually set the focus to infinity at full zoom (with lever), and queried it with get_focus(), I got values that were more like 126582 to 129386, like I described in
another post.Anyway, I am confusedissimo, but making progress. I've attached the full script I am working on, if you're interested in taking a look.. Philmoz also replied to the zoom portion in the SX30 IS release thread
here, but I don't know if either (or both) of these threads is the right place for script discussion...