D90
Home Portfolio D90 Japan
Nikon D90 on linux

D90

(v1)

Ancient History

Here you can find the page as it was written around January 2009. If you still run ubunty hardy heron, or something similar some stuff here might be relevant. Else go to here.

Preamble

This page is about the problems I had connecting a Nikon D90 to Linux and the solutions I found. I did not invent any of what's described below, so don't credit me for the solutions. I just had to spend a lot of time finding them on the web. I hope google will find this page quickly enough for you not to waste too much time surfing while you should be shooting.

This page is not about the D90, tips and tricks, recommended gear, etc. All I need to know and more is on Ken Rockwell's site.

Hardware

I have an acer travelmate 3220 with Ubuntu Hardy Heron. Most of my computer works out of the box. That's not what this page is about.

For completeness:

~> uname -a
Linux pkoppenb-laptop 2.6.24-23-386 #1 Thu Nov 27 18:10:58 UTC 2008 i686 GNU/Linux

D70 work-flow

I used a Nikon D70 for 4 years. Its sensor was getting hard to clean at the mirror mechanics was sometimes unreliable (especially when shooting 1/10 s in vertical mode). I never had any difficulty using my D70 under linux. When I connected it it just appeared on the desktop, I transfer my pictures using cp, no f-spot fuss. As I shoot raw (give me one reason not to) I first need to convert all my pictures with dcraw to something useful like jpg, before I decide which ones need a closer inspection with gimp.

Nikon D90

On 6th Dec 2008 I bought a Nikon D90 body.

Mounting

First surprise, the D90 doesn't mount. The computer finds it but is not able to mount it: dmesg goes:

~> dmesg
[15130.864303] usb 5-3: new high speed USB device using ehci_hcd and address 7
[15130.997204] usb 5-3: configuration #1 chosen from 1 choice
That's all. I don't know if it's the D90, the Sandisk Ultra-II 8GB card, or the combination.

I found the decisive hint on the blog of Ingo Jürgensmann: Gphoto2 doesn't recognize the D90 he says. Had no idea what Gphoto2 was, so installed it and it worked!:

gphoto2 --get-all-raw-data

Just copies all data without ever mounting the device.

Also, make sure you're member of the plugdev group. Else you won't be allowed to mount anything. Obviously, on your own laptop that's not an issue.

White balance

Another surprise were all messages Cannot use camera white balance when I used dcraw. And indeed the produced jpgs are greenish. Erk.

The hint came from Camera Hacker. Actually the version of dcraw that is distributed in Hardy Heron is 8.80 that is 1 year old according to this. I got the latest version 8.89 from the same page. Now I do

dcraw -q 3 -w -c image.nef | convert -quality 95 -sharpen 5 - image.jpg

Processing

I use
The GIMP to process (aka "photoshop") my pictures. I mostly crop or tweek the white balance. But there's a catch: the raw images are loaded using ufraw, but the version (0.13) in ubuntu hardy doesn't understand the camera white balance. I got version 0.15 from GetDeb which works.

There's even more fine tuning advertised at the very nice Captured Moments blog.

EXIF

The next thing I do is to read the exif data from the nef file and write it into the jpg. I do:

exiftool -TagsFromFile image.nef image.jpg

To read the exif:

exiftool image.jpg (or nef)

This works out of the box. For the globe picture I get this.

Movies

Rotate

I guess shooting movies with a rotated camera doesn't make a lot of sense... Anyway, in case I did I get them rotated by 90 degrees doing

mencoder movie.avi -vf rotate=2 -ovc xvid -xvidencopts pass=1:bitrate=687 -oac copy -o rotated.avi

Note that I have an unusual way of holding the camera. For most people rotate=1 will be the better option.

Extract thumbnail

Well, not really a thumbnail, as I want a same precision jpg image:

ffmpeg -y -i raw_DSC_0119.avi -vframes 1 -ss 00:00:01 -an -vcodec png -f rawvideo raw_DSC_0119.png

Photos © Patrick Koppenburg
Dernière mise à jour: 21:42 2009-11-05 - Patrick Koppenburg
[haut]