: Is there a resource that can analyze image files and provide measure of luminence, saturation etc. automatically? I know that several of these values can be derived through photoshop, but it
I know that several of these values can be derived through photoshop, but it seems like it would need to be done manually for each image file.
What I'm interested in is a resource that I can give several image files (~300) and get measures of things like mean luminance, colour balance etc., in an automated fashion.
As a followup, you can maybe tell that I don't have a clear vision in mind of which measures I would like to get of the images. I'm curious what is out there? I'm interested in any variables that capture aspects of the image: luminance, symmetry, saturation, colour balance etc. I'd love to hear about any others that you'd recommend. Of course as a caveat, these should be easy to extract, using an automated process like I mentioned.
More posts by @Welton168
1 Comments
Sorted by latest first Latest Oldest Best
ImageMagick should be able to do most if not all of what you need.
ImageMagick is a command-line tool for reading, editing, creating and converting bitmap images.
What measurements you want or need to extract is hard to answer—there are infinitely many ways to measure an image. What is useful for you will depend on your use of those measurements.
You can find general usage examples for ImageMagick here:
Examples of ImageMagick Usage
Some more relevant examples of extracting image information with ImageMagick can be found here:
ImageMagick Tidbits - Image Information
A few examples from the ImageMagick Tidbits page:
Average RGB Color of an Image
convert rose: -colorspace rgb -scale 1x1 -format "%[pixel:p{0,0}]" info:
rgb(146,89,80)
Grayscale Minimum, Maximum, Mean And Standard Deviation Of An Imag
data=`convert rose: -colorspace gray -verbose info:`
min=`echo "$data" | sed -n '/^.*[Mm]in:.*[(]([0-9.]*).*$/{ s//1/; p; q; }'`
convert xc: -format "%[fx:100*$min]%%" info:
14.6151%
max=`echo "$data" | sed -n '/^.*[Mm]ax:.*[(]([0-9.]*).*$/{ s//1/; p; q; }'`
convert xc: -format "%[fx:100*$max]%%" info:
100%
mean=`echo "$data" | sed -n '/^.*[Mm]ean:.*[(]([0-9.]*).*$/{ s//1/; p; q; }'`
convert xc: -format "%[fx:100*$mean]%%" info:
41.2302%
std=`echo "$data" | sed -n '/^.*[Ss]tandard.*[(]([0-9.]*).*$/{ s//1/; p; q; }'`
convert xc: -format "%[fx:100*$std]%%" info:
18.581%
Test If Image Has Alpha Channel
[ "$(identify -verbose white.png | grep 'alpha')" = "" ] && echo "alpha off" || echo "alpha on"
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.