Sunday, February 22, 2009

Nikon D90 SDK hack and liveview image captures


So I downloaded Nikon's camera control SDK code, and built a sample program. Its pretty cool!

It allows one to set/reset pretty much all the menu items that one can do with the on camera menu system.

The one interesting test I did was to fetch liveview images off the camera by setting different zoom ratios in sequence.. so I was saving what would be shown on the rear LCD directly onto my computer. The results matched with earlier observations that the D90 firmware interpolates from a very low resolution buffer image when zooming in: to me that low res size seems to be 640x480 pixels. Here are the actual dumped files, in increasing zoom ratio, from 1X, 2X, 3.3X, 5X, 6.6X (max allowed on camera), and 10X (only allowed via SDK):

1X

2X

3.3X

5X

6.6X

10X



As can be seen, its a simple interpolation mechanism.. most probably a bilinear one.. that causes the zoomed in images to look jaggy upon zooming in. This is almost like a total digital zoom, with the source image being only 640x480 pixels. Imagine making 100 pixels (10x10) out of a single one in increments! So out of other things, one of the reasons for D300 being pricier than a D90 would be this: in D300, the zoomed in image in live view doesnt look so badly interpolated.

Here is a related thread if anyone is interested. I wonder if it does Nikon any good to have such poor interpolation scheme from a 640x480 buffer. For everything else, its such a fantastic camera. But then nothing is perfect in this world, is it? :-)

1 comment:

  1. Hi,

    Came across this post recently. I started using Nikon SDK and was trying to figure my way out in the code. Is it possible to capture an image on the SD card/PC using the SDK. I know that we can dump the live view image but what about RAW/JPEGs that it captures on shutter release?

    Thanks,
    Saksham

    ReplyDelete