Thread

Posted on Fri Sep 15 23:39:35 2006 by linuxuser
ISO-statistic
I use Linux and would like to know, if it is possible to query how much pics I made with ISO 80, ISO 100 a.s.o. My idea is to search for all original-pics with find and then pipe it to exiftool. One query could do an analysis which ISO I used, maybe I have to use sort and wc for it. The result should be like this e.g: 1300 pics with ISO 80, 4000 with ISO 100, a.s.o. It doesn't matter how the result is presented, I need the info only. If I can't do this with 1 query, please let me know, what comes closest.
Direct Responses: 3051 | 3076 | Write a response
Posted on Sat Sep 16 01:00:59 2006 by exiftool in response to 3050
Re: ISO-statistic
There are many ways to accomplish this. Personally, I would output all interesting information to a tab-delimited text file, then import it into a spreadsheet and plot the results. The command for this would be something like:

exiftool -t -s -S -f -q -r -iso -shutterspeed -aperture -focallength -filename DIR > out.txt

The first column in the file is ISO, the second is shutterspeed, etc.

Another way, which is closer to what you asked, is to output all information and use grep and wc to get your statistics (although for this technique you would have to specify each ISO separately). For instance:

exiftool -S -r DIR > out.txt grep -E 'ISO: 80$' out.txt | wc -l

This will output the number images taken at ISO 80.

Of course, there are many other ways to do it, but I hope this gives you some ideas.

- Phil

P.S. I know you said Linux, but I should also mention that there is a Windows XP utility based on ExifTool that will do all this a bit more easily for you: Exif Stats Utility.
Direct Responses: 3055 | Write a response
Posted on Sat Sep 16 01:25:00 2006 by linuxuser in response to 3051
Re: ISO-statistic
Thanks for the hint with Windows, but I prefer to do it with Linux. My problem is that I cannot use all the files of a directory and the subdirectories below. I think I must use find, probably with -name or regex and I don't know how I can pipe the result to exiftool. There are about 5000 files, which have to be analyzed. To import it into a spreadsheet would be also ok. Probably the better way.
Direct Responses: 3056 | Write a response
Posted on Sat Sep 16 01:30:16 2006 by exiftool in response to 3055
Re: ISO-statistic
Sure, using the output of 'find' to specify files is easy:

exiftool `find DIR EXPR` ...

(backticks can be useful)

- Phil
Direct Responses: 3058 | Write a response
Posted on Sat Sep 16 01:55:22 2006 by linuxuser in response to 3056
Re: ISO-statistic
There is a misunderstood. I know how to use find. I use: find /dir/ -type f -name "*r1-original.*" | wc -l to count the pictures of my R1-digicam, but it doesnt work to pipe it to exiftool. With exiftool I tried exiftool -q -q -s -s -s -EXIF:ISO
Direct Responses: 3059 | Write a response
Posted on Sat Sep 16 02:33:35 2006 by exiftool in response to 3058
Re: ISO-statistic
You misunderstood me. I know you know how to use 'find'. My point was that you should put the 'find' command inside backticks on the exiftool command line. Doesn't this do exactly what you wanted?
Write a response
Posted on Mon Sep 18 17:42:57 2006 by bozi in response to 3050
Re: ISO-statistic
Hi, What a wonderful Topic ... ;)
I was searching many hours und tried lots of tools to create statistics but i think the simplest way is:
exiftool -q -S -aperture . 2>/dev/null | grep -v ===== | sort| uniq -c | sort -nr
Of course, the win tool exifviewer 2.x outputs histogram graphs of the iso, aperture etc.
I think phils proposal with the export to a tab separated table is another good base to do such kind of stats.
My problem now is to build the graphs from the data at commandline!
bozi
Direct Responses: 3077 | Write a response
Posted on Mon Sep 18 18:18:22 2006 by exiftool in response to 3076
Re: ISO-statistic
Very nice Bozi. I didn't know about the 'uniq' utility. This really helps.

To simplify things a bit, you don't need the 'grep -v' when you use the '-q' option. And adding a second '-q' would also suppress warnings, making it unnecessary to redirect stderr. So your command becomes:

exiftool -q -q -S -aperture DIR | sort | uniq -c | sort -nr

- Phil
Direct Responses: 3090 | Write a response
Posted on Tue Sep 19 15:52:46 2006 by bozi in response to 3077
Re: ISO-statistic
The text-version of the stats ist now ready. But im trying at this time to build a graph from this data with gnuplot or grace
To get the pure Data i piped the output to awk '{print $3 " " $1}'
Gnuplot seems to be a lot easyer to handle. I used the cvs version because it offers better handling for histograms.
BUT grace has a batchmode (gracebat) and a special histogram function too. Atm it seems very difficult for me to configure grace to get the right output.
Anyone familiar with this grace an can help me?
Its better to do the whole stats with perl?
Does any perlmodule exists that easy generate graphs, especially histograms ?

bozi
Write a response