hi uffe. welcome to the club
. i came across this post while searching for my own settings (hoped i posted them somewhere here, some time.. ) -- mentioning just for anecdotical value
here we go, see my comments online
Originally posted by uffe Hi,
I am trying to learn batchconversion on kubuntu and try to automate everything from copying the files from the memorycards, creating jpg:s in several resolutions from jpeg and making backup.
I have solved everything except creating the jpeg files with good quality, I have the camera set on jpeg + dng to have out of camera jpeg as reference. I have problem to sharpen the photos with imagemagick in a good way, jpegsfrom camera have much better details.
Does anyone use a setup as this with good results I would be happy to see what commands you use with what input you use, currently I have just copied stuff from different scripts but do not manage to get good output.
Below is the current jpeg conversion, I have tried to minimize the jpeg conversion also but got worse result so even if I am not sure how the exposure compensation work I kept it. The curve is from a k20D-file I found on this forum in an older thread. Did not find any good for k10D (only a really bad one).
I tried to use GIMP and digikam to get good start values but found that I did not get the same results in ufraw-batch so I guess some other default parameters of values might trick me.
play with ufraw (gui) more, gimp is quite different, they are very different beasts, handling very different jobs with very different input
.
Quote: Any input is really appreciated for other pentax cameras as well but please note which camera type you use.
Best regards
Uffe
for i in *.DNG; do
#Get ISO
ufraw-batch --exposure=auto --clip=film --black-point=auto --wb=camera --create-id=only $i 2> /dev/null
ISO=`cat ${i%\.*}.ufraw | grep "<ISOSpeed>" | sed 's/<[^<>]*>//g'`
this is commonly called "useless use of cat"
. nothing wrong with it as far as image wuality is concerned, though
. "grep ISOSpeed ${i%\.*}.ufraw" should do the same job. however, the real wtf up here seems to me running ufraw to create an id file to get the iso setting. i'd just use exiftool instead.
exiftool pics/aug30/104_3008/k20a5554.pef | awk '/^ISO /{print $3}'
400
(not the most enlightened regexp, but it's an example)
Quote: #Set ratio between ISO and noise reduction
let "NOISE=ISO/7"
interesting, never thought of devising such a formula. does that work well? (i'll have to try it
)
Quote: #Get exposure information
OUTPUT=`cat ${i%\.*}.ufraw | grep "<Exposure>" | sed 's/<[^<>]*>//g'`
#Adjust automatic exposure compensation
EXPOSURE=`echo $(echo "scale=6; (-0.025*$OUTPUT^3)+(0.6*$OUTPUT)+0.1" | bc) | sed 's/^\./0,/g' |sed 's/\./,/g' | sed 's/-\,/-0,/g'`
#Remove temp file
rm ${i%\.*}.ufraw
#Behandla för utskrift original
echo "Skapar filen $HOME/Temp/BildUt/Print/${i%\.*}_print.jpg"
ufraw-batch --wb=camera --gamma=0.35 --exposure=$EXPOSURE --black-point=auto --clip=film --wavelet-denoising-threshold=$NOISE --base-curve-file="$HOME/Temp/Pentax_K20D_natural_curve.txt" --saturation=1.0 $i --output=-
if you have so many options you want to set, i'd use a more elegant way (see man ufraw, something like id file but more generic, can't remember, i never used it, as i mostly let ufraw do it's job, as it does it well in most cases)
Quote: | convert - -sigmoidal-contrast 1.4,20 -unsharp 10x10+0.7+0.06 -quality 95 $HOME/Temp/BildUt/Print/${i%\.*}_print.jpg
sigmoidal-contrast with 1.4,20 (isnt that "1.4,20\%"?) sounds strange to me, it means you are setting the mid grey to 20% (which is quite far from 50%).
the usm settings are very unballanced to my eye. i can't remember mine though
. i think it was radius of 3 (first number, yours is 10, must take a long time to do, btw
), 3x0.5+1.5+0.02 (1.5 is the amount, that's usually what i change, usually to bring it down). i reached these settings through a lot of trial and error, and after finding an excellent explanation on how it works for imagemagick (different from gimp and most others, notice they tend to have 3params, you have 4 here). a very interesting read, if you are inclined:
Sharpening using Image Magick Red Skies at Night
(not sure this is exactly what i read back then, but it looks good, and i can't find the other one
)
Quote: exiftool -TagsFromFile "$i" -overwrite_original -all:all --orientation -copyright='Uffe' "$HOME/Temp/BildUt/Print/${i%\.*}_print.jpg"
done
hope this helps. feel free to ask if there's anything more we can help with.
ps: oh, btw, i'd be interested in that curve file (especially as i have a k20d)
ps2: to get an idea of what i get:
http://nanok.is-a-geek.com/gallery2/main.php?g2_itemId=4741
almost all pictures on my gallery letely are processed that way (most importantly, with those sharpening settings)