[Hdri] HDRI capture program for Canon EOS cameras under Mac OS X
Gregory J. Ward
gregoryjward at gmail.com
Wed Jan 25 23:25:42 CET 2006
Hi Trent,
The other thing I didn't mention about Nikon is that they deliver
their software APIs on about 15 CDs, after having you sign a long non-
disclosure agreement and mailing it in, making it a bit of a pain to
get started.
I wouldn't bother to make a plug-in architecture for what I have, but
I'm happy to supply source code to anyone who is interested in
developing an interface for their camera. There isn't much to the
program, really. The only thing that it does that's worth anything
is the code to extract pixels from the thumbnails.
John Mardaljevic pointed out that I misquoted the URL for the capture
software, which is actually at:
http://www.anyhere.com/gward/pickup/HDRcapOSX.tar.gz
Also, I forgot to include the README.txt file, which I've appended to
this e-mail for those who found the link and download what was there
already. (I added it to the archive just now, so new downloads
should get it.) As the README explains, only the CanonHDRcap
application and the canoncap script are Canon-specific. Of these,
the canoncap script is easy enough to modify, but you need a
scriptable program to operate your camera remotely for it to do
anything useful.
-Greg
> From: Matthew Trentacoste <mmt at cs.ubc.ca>
> Date: January 25, 2006 12:01:10 PM PST
>
> Yeh, that's why I was asking about a plugin API to add additional
> cameras. If I'm willing to do the work to get my D70 to work,
> someone else might be willing to to do a D200. Sure, you'd end up
> having to tack on 2 dozen shared libraries to support every camera,
> but I'd still say that for me to add support for my camera is less
> effort than to reinvent everything else Greg has done.
>
> Trent
-------------- next part --------------
HDR Capture Utilities 0.9
01/24/2006 Greg Ward with help & sponsorship (see Acknowledgements)
I have put together a few utilities that should make HDR capture a little
easier, especially for Canon EOS cameras. There are three directories in
this distribution:
app/ Canon HDR capture application and control file
bin/ C-shell scripts and PPC executables
doc/ Some HTML documentation
Instructions for all users
==========================
Put the files in the bin/ directory either in /usr/local/bin or your own
bin directory -- someplace in your execution path. The hdrgen program should
be familiar to you already, but for information, consult the included
hdrgen.html document. Below is a brief description of the other programs:
canoncap - C-shell script to manage Canon HDR capture & conversion
dcraw - David Coffin's RAW image converter, needed by raw2hdr
raw2hdr - C-shell script for RAW -> HDR merging
The canoncap script is not really relevant, unless you are one of the...
Canon EOS users
===============
Move the contents of the app/ directory someplace sensible, such as
/Applications/Utilities or somewhere under your home directory. You
will need to edit the CaptureParams.txt file, which needs to live in the
same folder as the CanonHDRcap application.
Edit the CaptureParams.txt file with a text editor. If you want to save all
the images you capture, make sure the second line is set to 0. If you would
rather not have these files left around (and you don't own an EOS 300D camera),
set this to 1 to clean up LDR files afterwards. Then, choose an output
directory and base file name for your images, which will have a 4-digit
number and extension added to them. If you like, change the search f-stop
step, which indicates the spacing between exposure times as CanonHDRcap
looks for the first useful exposure. The next line (f-stops between captures)
indicates the spacing for the actual sequence, with the final setting being
the number of captures to take.
You will need to set the camera in "manual" exposure mode, and you
should fix the white balance to match your scene and choose an
aperture that allows a slightly underexposed image at the fastest
shutter speed, or wide open for darker scenes. You can capture either
JPEG images (preferred) or RAW, but not both. Also, you may get
better results if you turn off autofocus. Obviously, you'll want
to mount the camera on a tripod -- if you just set it on a table,
an SLR will tend to shift from its mirror action. Connect the
camera to the Mac via its USB or Firewire connector, and off you
go. Be sure to set it in the "PC connect" mode, not PTP, which is
for printers and doesn't function for remote control applications.
Double-click on CanonHDRcap from the Finder, or use the canoncap
script described below.
The "canoncap" script runs CanonHDRcap and hdrgen/raw2hdr for you from the
command line, but you need to edit the script first to set the appropriate
installation paths according to where you've put things. Open canoncap
with a text editor, and alter the "set respf=" and "set capapp=" lines
appropriately. The first sets the location of your camera's response file,
which will be created the first time you run the script. From the command
line in a Terminal or xterm window, run:
canoncap {output.hdr}
to capture your image. Just like raw2hdr and hdrgen, you can actually output
to any number of HDR formats, as determined by the suffix on your output file:
.exr - OpenEXR format (large, highly accurate)
.tif - LogLuv TIFF (more compact, accurate)
.hdr - Radiance RGBE format (compact, reasonably accurate)
.jpg - BrightSide's JPEG-HDR format (very compact, less accurate)
I have found RAW captures to be problematic for HDR capture, resulting in pink
areas that seem to be caused by the default highlight normalization in dcraw.
I'm not sure how to fix this problem, but any hints would be appreciated.
That's it. Let me know if you run into problems.
ACKNOWLEDGEMENTS
================
This work is sponsored by the Lawrence Berkeley Laboratory through a contract
with NYSERDA. Please write to <gward at lmi.net> with questions or if you intend
to use this in a publication and need wording for proper attribution.
The dcraw program is written by David Coffin, and provided free of charge.
Please credit him if you use the raw2hdr script for converting RAW to HDR,
as it is 99.5% his work and generosity that makes this possible.
More information about the HDRI
mailing list