sener.blogg.se

Calculate pixel number linux imagemagick
Calculate pixel number linux imagemagick










calculate pixel number linux imagemagick calculate pixel number linux imagemagick

This is because you are basically trying to differentiate between these 2 colors. We do 2 things to make this really easy.Ī- Scale the image to make it 100x100 (forced), this will give us 10000 pixels, easy for percentages.ī- We change the channel depth to 1 bit. The main idea is to "convert" an image from one format to another, in this case, the output format is a histogram. Which can be translated to 71.68% red, 26.16% lime and some yellow. Now, all you need to do is execute a command to get the info:Ĭonvert -resize 100x100\! image.jpg -depth 1 -format %c histogram:info:. With windows you might need to set up some path or something, but I'm sure you can find info out there. This should be easy with a Mac or Linux machine. Research you say? Well, in that case you won't be intimidated by some command line work. She has met her first $1000 promise for Alzheimer's research and is working on her second $1000. My wife is proud to participate in the Alzheimer's Quilt Initiative! % red area: 244,669/307,200 x 100 = 79.64%Īdjusting the fuzziness probably has less variability than the natural variation of the leaves in the field. Green selected with Color range and medium fuzziness=62531 pixels This could have other useful applications.

calculate pixel number linux imagemagick

I had never noticed that the selected pixel count displayed in the histogram. Redcrown's suggestion works very well and should be accurate enough for your purposes.












Calculate pixel number linux imagemagick