Camera Hacker

:

Add Comment | Related Links | TrackBack
Related Content

ProcessRaw.sh

In chapter 3 of the Hacking Digital Cameras book, I presented a simple UNIX shell script that would recurse into all sub-directories and process all of the raw files. The shell script took advantage of the free dcraw converter. I have attached the shell script below so you don't have to type it in yourself.

Feel free to improve upon this script or customize it for your own needs.

One improvement that could be done to this script is to allow the use of spaces in directory names. Right now, the script could only recurse into subdirectories that do not contain spaces.

Attached File: ProcessRaw.sh

Chieh Cheng
Tue, 31 Jan 2006 17:10:04 -0800

I quickly implemented a few things on top of ProcessRaw.sh :)

Now it:
-Checks if there are crw files in the directory
-Doesn't reprocess already processed files (saves a lot of time on slow machines)
-Shows progress (which file in which dir)
-Performs basic error checking
-Recurses directories even if they have spaces

Things I might implement later:
-add a '-v' option for the progress report
-add a '-f' option to force processing of already processed files
-add a '-d' option to save the PPM in another directory (usefull if working from a read-only media containing the crw files)

Enjoy!
Michael

Attached File: 1 - ProcessRaw.sh

Michael Petre
Thu, 16 Feb 2006 12:52:32 -0800

Hi Michael,

I was quite excited to read about your improvements. But when I clicked on your attachment, it is the original version. I'm thinking you probably uploaded the old version on accident. Do you mind checking your upload? Thanks.

Chieh Cheng
Thu, 16 Feb 2006 13:07:00 -0800

Ooops, sorry about that... I had attached the wrong one :(

Attached File: 2 - ProcessRaw.sh

Michael Petre
Mon, 20 Feb 2006 10:44:20 -0800

Add Comment | Related Links | TrackBack
Related Content

Did your message disappear? Read the Forums FAQ.

Add Comment

Spam Control | * indicates required field
Your Name: *
E-mail:
Remember Me!
Comment: *
File attachment is optional. Please do not attach a file to your submission unless it is relevent.
Attach File:
(20 MB Max)
Spam Protection: * Answer of 8 - 10?
Click button only once, please!

TrackBack

Send Ping | TrackBack URL | Spam Control

No TrackBacks yet. TrackBack can be used to link this thread to your weblog, or link your weblog to this thread. In addition, TrackBack can be used as a form of remote commenting. Rather than posting the comment directly on this thread, you can posts it on your own weblog. Then have your weblog sends a TrackBack ping to the TrackBack URL, so that your post would show up here.

Messages, files, and images copyright by respective owners.