[Originally posted by linuxuser on 2006-09-15 20:39:35-07]
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.
[Originally posted by exiftool on 2006-09-15 22:00:59-07]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.
[Originally posted by linuxuser on 2006-09-15 22:25:00-07]
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.
[Originally posted by exiftool on 2006-09-15 22:30:16-07]Sure, using the output of 'find' to specify files is easy:
exiftool `find DIR EXPR` ...
(backticks can be useful)
- Phil
[Originally posted by linuxuser on 2006-09-15 22:55:22-07]
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
[Originally posted by exiftool on 2006-09-15 23:33:35-07]
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?
[Originally posted by bozi on 2006-09-18 14:42:57-07]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
[Originally posted by exiftool on 2006-09-18 15:18:22-07]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
[Originally posted by bozi on 2006-09-19 12:52:46-07]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
graceTo 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