D90
Home Portfolio D90 Japan
Nikon D90 on linux
D90

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 a DELL XPS16 with Ubuntu 9.10 (Karmic Koala). Most of my computer works out of the box, including the card reader. That's not what this page is about.

For completeness:

~> uname -a
Linux pkoppenb-dell 2.6.31-20-generic #58-Ubuntu SMP Fri Mar 12 05:23:09 UTC 2010 i686 GNU/Linux

Work-flow

I work the following way
  • I download the pictures (usually copy from the card reader).
  • I copy and compress them. I keep the original on a DVD.
  • I then purge about 2/3 of the not so nice pictures (if I don't get 2/3 in the first round I redo it...)
  • I organise all that in local web pages that I sometimes put on the web. This page is not about that.
  • Downloading pictures

    With old versions of linux I had troubles mounting my camera. If you do, have a look at the v1 page. Now when I plug it in, gnome asks me what to do. The default action is to use fspot. That works fine, but I don't do it as I like having everything scripted. I unmount the camera and do

    gphoto2 --get-all-raw-data

    That just copies all data without ever mounting the device.

    Reduction

    The next step is then to reduce the size of my pictures. I most of the time shoot in jpg, sometimes (rarely) in raw. I am not so fond of raw anymore, because it is not a format. Only Nikon knows what's inside and I have no guarantee that there will be something allowing me to view my pictures in 10 years times. And yes, I do care, as I still look at the pictures I did 10 years ago. Hence my tip: if you shoot raw, convert to jpg and save both to DVD. DVDs are cheap.

    Raw

    To convert raw I do:

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

    More details are on the v1 page.

    Fine jpg

    Memory cards are not so cheap, but for a trip to South Africa I bought 4 8GB cards, which allowed me to do 3500 pictures and still have a spare card. Hence, I really don't see why one would shoot anything but fine. These pictures still have a size of about 5MB. That's too much for a computer screen, and for my poor CPU. I reduce to 1280 bits size using

    djpeg image.jpg | pnmscale -xysize 1280 1280 | cjpeg -quality 90 > output.jpg

    Processing

    I use The GIMP to process (aka "photoshop") my pictures. I mostly crop, or tweak the white balance. Under Hardy Heron I had a white balance problem described here.

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

    Watermark

    I always watermark my pictures. Just to annoy people who don't care about copyright. There's no legal requirement. Pictures are always copyrighted in most countries except if they are explicitly put in the public domain. I do

    mogrify -verbose -font /usr/share/fonts/truetype/freefont/FreeSans.ttf -draw "gravity southeast fill black text 0,33 'www.koppenburg.org' fill white text 1,32 'www.koppenburg.org' " picture.jpg

    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 elephant picture I get this. If you inspect closely you'll notice I have bought the GP-1 GPS module. That allows to easily link to google maps. The elephant was at 17° 50' 11.99" S, 25° 5' 57.65" E, at 924 m.

    Movies

    The movie feature is very nice. Make sure you always have a little tripod with you. Else it's almost impossible to stop the movie without shaking the camera.

    Rotate

    I guess shooting movies with a rotated camera doesn't make a lot of sense... I did it a few times by mistake. That's what I then did to recover.

    Compress (HELP NEEDED!)

    The next step is not yet satisfactory. I can compress movies doing this:

    mencoder -ovc lavc -lavcopts vcodec=mpeg4:vqscale=4 -ffourcc DX50 -oac mp3lame -lameopts br=128 -vf scale=854:480 -o output.avi input.avi

    but these movies are not visible under windows. That's OK for my own use, but not cool for sharing on the web. If anyone knows what to do with this movie please let me know..

    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

    Contact

    I'm always happy about feedback. Drop me an e-mail with your comments.

    Photos © Patrick Koppenburg
    Dernière mise à jour: 10:59 2010-04-08 - Patrick Koppenburg
    [haut]