4

I was wondering how i would be able to get started with controlling my nikon DSLR camera? I have been reading on the Nikon SDK and MPT/PTP and is really confused on how to start with writing a script to control it. Thanks for helping me.

Sinjon
  • 41
  • 1
  • 5
  • You might want to add an actual question rather than simply stating your problem. What have you tried? – Jason Carter Mar 29 '13 at 13:55
  • I have no idea how to get started to control my camera through MTP/PTP. Do I use C, C++ or C# and can I write my program using Visual Studios? I also have been fiddling around with this program [http://www.digicamcontrol.com/] which uses MTP but I do not require such a complex program as all i want to do with mine is to script a simple program to take pictures and save them – Sinjon Mar 29 '13 at 14:20

3 Answers3

2

this is what you are looking for: http://sourceforge.net/projects/nikoncswrapper/

Good luck

Paweł
  • 409
  • 3
  • 13
  • 1
    We are using it currently, and whera are some minor issues related to Nikon SDK - only one camera support, sometimes problerm with connecting when program was forcibly closed - but it als works. – kwesolowski Jan 10 '15 at 12:08
  • Is the "only one camera" support still valid? Or is it possible to connect multiple Nikon cameras? – bastelflp Jun 28 '16 at 16:36
2

If you are just wanting to script stuff, under Linux libgphoto2 and gphoto2 are a good start.

You can use them under windows, I'm not sure if there are pre-compiled build available, but that would also require installing the USB wrapper libraries, and that a touch fiddly.

The next step above that is to compile libgphoto2 in cygwin (there are some good guides how to this on the web), but that overkill.

I am currently using digicamcontrol in windows, and for Nikon and C# code it's really nice to use, and very fast, plus it has no hassle on the USB front. It wouldn't be too hard to write a small C# that does what you want (unknown) and then run that from scripts.

Simeon Pilgrim
  • 22,906
  • 3
  • 32
  • 45
  • License digiCamControl is MIT, so just take sources and use CameraControl.Devices library to build C# app or just small tool to integrate your software with it. – kwesolowski Jan 10 '15 at 12:07
2

In case anybody is still looking at this: the answer is a bit more complex if what you are looking to do is write your own code to access a Nikon DSLR. Thomas Dideriksen's SDK wrapper referenced above is great in making it easy to access Nikon's SDK to control almost all camera functions - but it is restricted to USB-cable access since that SDK does not support wireless access. If the latter is what you want, your best option may be Duka Istvan's digiCamControl, which Simeon suggests above. This open-source C# project can be used as a standalone library. (See the development documentation page.) It is not all that well documented, though, so figuring out how to control all camera parameters can be tricky.

Lon
  • 73
  • 2
  • 11