views:

730

answers:

2

A Delphi programm should make produkt photos with a Nikon D5000AF SDX. The only commands I need are "make a photo", "get me the photo".

Which library or API can help me?

+8  A: 

@Heinz, to control a device you must use an SDK, which must be supplied by the manufacturer of the device.

from the nikon site :

....We are offering Library Programs and Command API Specifications for software applications that offer remote control functions for Nikon digital-SLR cameras connected to a computer. When these are utilized, the software application can be used to modify camera settings, including shutter speed, aperture, and ISO sensitivity, and to control camera operations, including shutter release.

in this page you can find the SDK for the Nikon cameras, including the D5000 series.

Bye.

RRUZ
Thanks, I have donwload the SDK. But I look for a simpler way. At the moment I am looking at "Windows Image Acquisition".
Heinz Z.
Because I don't get the WIA solution running I take a deeper look at the SDK. Is there a delphi wrapper for the SDK available?
Heinz Z.
+4  A: 

Hi

I would advise using the WIA (Windows Image Acquisition) API. For this you need the file "WIALib_TLB.pas" which will be created by Delphi automatically when following these steps:

  1. Select "Project > Import Type Library" from the Menu
  2. Select ""Microsoft Windows Image Acquisition 1.01 Type Library" from the list
  3. Choose "Create Unit"
  4. You will then get the unit "WIALib_TLB.pas"

Use the code from the following URL to see how you can enumerate the available devices and their properties and take a snapshot with the camera.

http://www.neunbeere.de/UseNet/WIA.html

Sorry, the comments are in German, but I think the code is easy to understand

NineBerry
Thanks, I have compiled your source. I get the camera properties, I can transfere photos from the camera but no picture is returned after TakePicture call (Cameras: Canon Powershout 520, Nikon D5000).Other WIA programs have the same problems. Any ideas?
Heinz Z.
TakePicture is for Webcams, i.e. for cameras where the camera image is transferred to the computer live. TakePicture means taking a snapshot just at the very moment you call the method.Most normal digitcal cameras that are not webcams will not allow you to take pictures while the camera is connected to the computer. You can only access the pictures that are already stored on the camera.
NineBerry
Looks like the asker specifically needs to be able to trigger the taking of pictures from the camera.
Luke