Camera Hacker

:

Add Comment | Related Links | TrackBack
Related Content

How to set shutter speed and lens aperture using Canon SDK

How can I acquire images using the Canon SDK with the shutter speed and lens aperture set to the values I want?

I am using the Canon Powershot A95 compact camera with the remote control SDK (7.3).
With this I am able to control the shutter release and retrieval of the images from my own application.
I can also control a lot of camera settings, like the ones shown in the example program.
My aim is to have the following camera settings while acquiring a sequence of images:
- Macro
- Fixed shutter speed and lens aperture (F)
- Auto focus on centre

I can get the camera in macro, using a setting called 'close-up'.
Although I can put the camera in a 'manual' state, I do not know how to control the shutter speed and lens aperture.
I have tried to put the camera into the settings I need (by hand) and then attach it to the computer and run my remote control software, but the camera seems to go into a default state (1/125 sec and F/4) when put into remote control.
Auto focus only on the image centre would be very helpful (and the camera supports this), but I can do without.

Any suggestions are welcome.

Paul Boon
Tue, 16 Jan 2007 02:56:54 -0800

It is dokumented in the Handbook of the SDK. With the EOS 10D and the SDK 8.3 its no problem. Possibly the camera does not support that?

anonymous
Sun, 21 Jan 2007 10:49:09 -0800

Hello,

I'm sorry not to bring up a solution to your problem, but i really wish you could answer my question :

I currently develop a software to remote control my powershot A95 (SDK 7.1)
I did not succeed putting it on 'macro' mode. Could you please tell me what is the solution.

You mentionned the close up mode :

// cdType.h extract #define cdAF_DISTANCE_CLOSE_UP 0x0003
cdSetAFDistanceSetting (hSource,0x0003);

is that the kind of operation you meant ? Because unfortunately it doesn't work for me :(.

If you could send me some source file and or explain the solution i will really appreciate that.

best regards

jeremie
Sun, 21 Jan 2007 17:55:46 -0800

Hi,
First of all, the Macro or Close-Up only enables the camera to focus on nearby (15 cm) objects.
I think that the example pogram and code (CamCtrl?), could do the trick, so you could take a look at that code.
It supprised me it wasn't the CDSetShootingMode with cdSHOOTING_MODE_MACRO.

I use the following code:
cdAFDistance AFDistance = cdAF_DISTANCE_CLOSE_UP;
CDSetAFDistanceSetting(m_hSource, AFDistance);

If it doesn't work, I would first upgrade the SDK to version 7.3.

Good luck!

Paul Boon
Mon, 22 Jan 2007 00:19:43 -0800

Hello !

Thank you for your quick answer Paul Boon.
It's seems that with your code, the macro mode work well thank you very much !!

I dont understand either why the macro is not listed in the shooting mode.

have a nice day !

jeremie
Mon, 22 Jan 2007 03:08:08 -0800

Ok,
after all those years of programming I stil forget to RTFM.
The shutter speed can be controlled using CDGetTvValue, CDSetTvValue etc. and the aperture can be controlled using CDGetAvValue, CDSetAvValue etc.
Simple look at the Av&Tv section of the manual.

Only one problem remains, if the camera is set in cdREMOTE_SET_AV_Open or cdREMOTE_SET_AV_Max, how do I get the actual value?

Paul Boon
Thu, 01 Feb 2007 07:05:49 -0800

Add Comment | Related Links | TrackBack
Related Content

Did your message disappear? Read the Forums FAQ.

Add Comment

Spam Control | * indicates required field
Your Name: *
E-mail:
Remember Me!
Comment: *
File attachment is optional. Please do not attach a file to your submission unless it is relevent.
Attach File:
(20 MB Max)
Spam Protection: * Answer of 9 + 1?
Click button only once, please!

TrackBack

TrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites.

Send Ping | TrackBack URL | Spam Control

No TrackBacks yet. TrackBack can be used to link this thread to your weblog, or link your weblog to this thread. In addition, TrackBack can be used as a form of remote commenting. Rather than posting the comment directly on this thread, you can posts it on your own weblog. Then have your weblog sends a TrackBack ping to the TrackBack URL, so that your post would show up here.

Messages, files, and images copyright by respective owners.