PDA

View Full Version : SDK question... PLS HELP!!


achoy
9th of October 2003 (Thu), 08:37
Hi,

I'm currently trying use the SDK to write an app to take some close-up photos. The problem is that the camera doesn't find the correct focus point everytime. Even when I use RemoteCapture, I still need to turn on and off the "Macro" and "AF lock" serveral times before the camera focus properly. So, my question is how to control the camera so that it finds the focus point correctly and consistently.

Just to give more details. The object is about 7cm away from the tip of the len (when it's turned on). The sequence of how I set the camera is as following:
1) Set camera in "cdSHOOTING_MODE_PROGRAM"
2) Set the desire zoom (ie to 0)
3) Set the CDSetAFDistanceSetting to cdAF_DISTANCE_CLOSE_UP (here, I assume this is equivalent to the 'Macro' in RemoteCapture).
4) Set the CDAFLock ON.
5) Release

Also, I found that the camera find the focus better if I switch between cdAF_DISTANCE_CLOSE_UP and cdAF_DISTANCE_AUTO couple times in step 3). I am not sure why but it seems like this would reset the auto-focus on the camera. However, I still can't get consistent focus on the camera with this weird method.

p.s. If someone can't replicate this problem, try changing the zoom around in step (2) before proceeding to (3).

Please help!! This is driving me crazy~~

Thx guys,
Ambrose

atleypnorth
9th of October 2003 (Thu), 09:02
Are you displaying the view finder images before you do the release ?

Also which camera are you using?

achoy
9th of October 2003 (Thu), 10:42
No... I didn't use the viewfinder before release.

I'm using PowerShot G3....

Thanks!!!

atleypnorth
10th of October 2003 (Fri), 04:20
Wellll i guess it should work, dont have a G3 here so cant test it directly. Strangely enough the latest SDK doesnt mention the G3 in supported modes etc... Think have a G5 which could try it on and see if it does the same.

What I have seen is that at times have to change some
camera settings to get it to readjust exposure / focus so switching between the AF modes isnt that bad an idea.

Suppose the other possiblity is that if the target is small the AF getting confused at times ?

achoy
10th of October 2003 (Fri), 08:28
I've just tried again today. I found that the RemoteCapture can focus properly and consistently if I turn on 'Macro' and then 'AF Lock' before release. I tried to do the same thing with SDK but only be able to get the correct focus once every 10 attempts. Like I mention early, if I change between cdAF_DISTANCE_CLOSE_UP and cdAF_DISTANCE_AUTO couple times before setting AF lock, it has a higher chance to find the focus point but not everytime.

Now that I'm wondering if the camera enters a wrong state in certain sequence. Also, I found another thing in RemoteCapture, if I set 'Macro' on -> set 'AF Lock' and then release, the picture looks find. However, if I then turn 'AF Lock' OFF and back ON. The next photo will not focus properly.

So, is there a particular sequence that I need to turn those things on/off?

This thing is realllllly flaky!

Thanks a lot man!!

atleypnorth
10th of October 2003 (Fri), 09:57
If I get time I will have a play with the G5 and see
if it has the same problem and see if can work
out what it is upto - though I dont hold out much hope for that !

alan-G3
16th of October 2003 (Thu), 03:48
Hi There
Even if you use canon's own remote prog, any time you change a setting, you have to switch macro off and then on again otherwise it claims to be in macro mode but isn't. Yes, I know this doe not help. It must be a "feature" of the hardware!

can5144
14th of January 2005 (Fri), 04:44
Hi,
we encountered similar problems in the current SDK version with G6 as you described in your 2003 message.
Did you find a solution for these focus problems in the meantime?
Thx so much!!
Ciao