Page 1 of 1
Massive stack (50k+) of images to determine histogram
Posted: 2017-07-24T12:54:24-07:00
by JC_Chicago
I am able to successfully obtain histogram image data, but on only one image at a time.
I have more than 50k images that need to be reviewed, but then, and this is vital, export a simply text file (csv) with the file name and subsequent histogram.
Yes, I can put several thousand into one file, to break the process into logical pieces, and to make the exported csv file more manageable.
Thoughts?
Running 7.0.6 on a PC.
Re: Massive stack (50k+) of images to determine histogram
Posted: 2017-07-24T13:09:21-07:00
by snibgo
I don't understand what you are asking.
You can write the data you want from one image to a CSV file, correct? Then you can put that in a FOR loop to loop through all the image files, appending to that CSV file.
Re: Massive stack (50k+) of images to determine histogram
Posted: 2017-07-24T13:55:06-07:00
by JC_Chicago
No, I apologize, for I am unable to determine how to export the data from even one reviewed image. I've reviewed the community board but can't find anything about it.
Re: Massive stack (50k+) of images to determine histogram
Posted: 2017-07-24T13:58:19-07:00
by fmw42
try
Code: Select all
convert image -format "%c" histogram:info: > histogram.txt
Is that what you want?
Re: Massive stack (50k+) of images to determine histogram
Posted: 2017-07-24T14:51:11-07:00
by JC_Chicago
Okay, yes, thank you!, that is what I needed on a per frame basis, but now to do this for more than one image...
My *.bat file is failing to allow more than one command at a time, and boy, do I feel like an idiot now! I've used and written *.bat files for years, and now this simple command can't be replicated multiple times? Thank you for helping me through this seemingly easy task for everyone else.
Re: Massive stack (50k+) of images to determine histogram
Posted: 2017-07-24T15:18:17-07:00
by snibgo
I create one text file from a subset of jpg files. The output has the filename on one line, then the histogram.
Code: Select all
(
for %%F in (af*.jpg) do @convert %%F -format "%%f\n%%c\n" histogram:info:
) > histogram.txt