#1 (permalink)  
Old 09-21-2011, 01:04 AM
drummingpariah's Avatar
A Photo a Day
 
Join Date: Oct 2009
Location: Boston, MA
Posts: 41
Default Automatic script

This is a little nontraditional, as most of you are using Lightroom/Photoshop and are doing your post-processing by hand and I'm not.

I spent a lot of time messing with GIMP and with Photoshop, basically just adjusting Levels/Curves and adding a watermark to my images. In my world, nanoseconds hold value. Every second I'm waiting for a computer to finish what it's doing to continue working is a wasted second. So, I decided to write a small script to do some hard-and-fast processing for the web. Basically, I just import all my raw photos into Shotwell from my camera, then Favorite the ones worth showing to anyone and crop them. I hit the EXPORT button, and I go grab some coffee. Before boring you with the details of what the script actually does, I'll show you the before/after. (click the images for high-res versions)

BEFORE


AFTER

Originally, my goal was just to automate the watermarking process, but I quickly realized that I was defaulting to the same series of actions and settings for virtually all images. If it was overexposed, I'd bring the levels down so the darkest sport was black. If it was underexposed, I'd change the curves so there was better contrast on the darker end of the spectrum and basically even the photo out. I'm sure everyone does virtually all the same things for pretty much everything.

So it corrects the exposure, turns up the contrast a little bit, runs noise removal, adds a faint vignette, intelligently scales it down to 1280x{keep the same aspect ratio}, sharpens slightly (somewhat intelligently, I cobbled together a short algorithm that seems to work well), then adds the watermark on.

I realized that it was running really slowly on my laptop (around a half hour for 25 images), so I set up another script to 'manage' the processing. It loads whatever I've exported onto my server, tells the server to run the processing script, then pulls the post-processed versions back to the laptop so I can review/manage them. So far, I've been satisfied with the results, and it seems to work flawlessly on any images that I did a reasonably good job of taking in the first place. It doesn't rescue shots that don't deserve to be rescued in the first place, though. Now the entire script goes through 25 images in 5 minutes, and 100 images in 8 minutes (the uploading process is the slowest part, so lots more images don't actually take lots longer).

It's certainly less artistic than spending time in a darkroom was, but I'd argue that sitting in front of a computer is less artistic than standing behind a camera, and this frees up a LOT of my time and stress, decreases my turnaround times significantly, and allows me to focus on taking better shots.

Thoughts? Feedback? I spent a lot of time going back and forth on whether the vignetting was too much, or if it should be a case-by-case basis, and I'm colorblind so the contrast increase might be throwing off the saturation values (the histogram seems to indicate that, but there isn't much serious color clipping). I'm interested to hear what others think of this process.
__________________
---
Cheap and effective: D40x and a Nikon 85mm prime f1.8 lens.
Google+ me.

Last edited by drummingpariah; 09-21-2011 at 01:28 AM.
Reply With Quote
  #2 (permalink)  
Old 09-29-2011, 06:52 PM
4umfreak's Avatar
Clicky clicky...
 
Join Date: Aug 2011
Posts: 77
Default

While the changes to the image are difficult to identify from the images posted, I love the idea of automating the basics. I have something similar to convert my raw images to jpg but haven't spent the time to add watermarking etc.

It sounds like you're using the same tools that I am and I'd very much be interested to see your script and how you've automated the tweaking.
Reply With Quote
  #3 (permalink)  
Old 10-19-2011, 01:14 AM
drummingpariah's Avatar
A Photo a Day
 
Join Date: Oct 2009
Location: Boston, MA
Posts: 41
Default

Here's the script, as it currently sits. It requires ImageMagick and it's certainly not foolproof (if you don't have ~/images/Working\ Directory/ created, it'll just explode... and I've set it up to ONLY process .png images stored in that folder. I'm not a fan of JPG images, typically)
Code:
#!/bin/bash
# Authored by Jesse O'Brien
# http://uptimefirm.com

if [ ! -d ~/images/Working\ Directory/processed_images ]; then mkdir ~/images/Working\ Directory/processed_images; fi;

#cleanup temp file, in case last process was interrupted
mkdir ~/images/Working\ Directory/.temp

photos='~/images/Working\ Directory/*.png'
for f in $photos;
do
	echo "Beginning processing $f"
	convert -monitor -filter box -background black -noise 1 -sigmoidal-contrast 4x45% -unsharp 4x0.5+1+0.05 -vignette 500x200-150-150 $f ~/images/Working\ Directory/.temp/$f
	echo "Creating PRINT source for $f"
	convert -monitor -filter box -background black -noise 1 -sigmoidal-contrast 4x45% -unsharp 4x0.5+1+0.05 -vignette 1000x200-150-150 ./$f ~/images/Working\ Directory/processed_images/$f
	echo "watermarking $f"
	composite -dissolve 75 -gravity south '~/images/Working\ Directory/Watermarks/drivendaily.png' '~/images/Working\ Directory/.temp/$f' ./processed_images/drivendaily_$f
	composite -dissolve 75 -gravity south ~/images/Working\ Directory/Watermarks/photopalooza.png ~/images/Working\ Directory/.temp/$f ./processed_images/photopalooza_$f
	echo "removing original $f"
	rm $f
	echo "***** Processing complete for $f *****"
done

echo 'Core processing complete, cleanup in progress.'

#cleanup temp file
rm -r ./.temp
echo "Finished cleanup. Enjoy your processed photos!"
__________________
---
Cheap and effective: D40x and a Nikon 85mm prime f1.8 lens.
Google+ me.

Last edited by drummingpariah; 10-19-2011 at 02:31 PM.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off



Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.

What’s Your Preference?

Daily Digest

Each day we send out a quick email to thousands of DPS readers to notify them of updates. This email is just short excerpt of the first few lines of our latest post with a link if you want to read it all. You can unsubscribe from this this service at any time.

This service is provided by a third party (Feedburner) and you can subscribe to it by leaving your email address in the following field and confirming your subscription when you get an email asking you to do so.

Enter your email address for
Daily Updates:

Weekly Summary

For those wanting a weekly summary of what happens on this site this free email newsletter is probably your best option. It includes a summary of the tips posted to the site each week. This newsletter is subscribed to by over 25000 readers (many who also subscribe to the other options above) - come join the community!

To subscribe to this weekly newsletter simply add your email address to the following field and then follow the confirmation prompts. You will be able to unsubscribe at any time.

Enter your email address for
Free Weekly Newsletter:

 
SEO by vBSEO 3.3.0