I am out of town and cannot verify the following, but there are a number of
ways to do this, one way is ...
You can resize the image to 1x1 pixel and check the color value
convert image -resize 1x1! colorspace Gray -format %c txt:-
or better
convert image -resize 1x1! colorspace Gray -format "%[fx: u.p{0,0}]" info:
check the fx escapes
http://www.imagemagick.org/Usage/transform/#fx_escapes
but you can also put the results of this into a variable and then check that
value against a threshold.
thresh=250
value=`convert image -resize 1x1! -colorspace Gray -format "%[fx: u{0,0}]"
info:`
test=`convert xc: -format "%[fx: $value<$thresh?0:1]`
echo $test
if test=1 it passes
if test=0 it fails
_____________________________________________
Hello,
I have big 3000x7000 pixel images from satellite swath scans.. I am
automatedly processing such dataset and mostly using IM and some
cartographic libraries...
At every processing step I would like to check whether the actual step has
been executed correctly and the output images are "correct".. Of course,
also this step needs to be automated..
One of the checks that I surely need is to determine whether the output
image is a plain white image or a plain black images..
I would like to know if there is a simple way of doing this check and
quickly!!!
Basically checking if all pixel values are above, say the 250 value
threshold, or below the 0 value threshold...
Also these checks are automated as I said and will be executed for every
satellite image that my "processor" will get as input.. so its important to
keep this check (amongst others) as efficient as possible.
I tried Fred Weinhaus's scripts (in particular colorspectrum and histog )
but they somehow seem to take up too much time... maybe there is a way to
use them in a more optimized manner ??
Any suggestions would be of great help..
Best
Mattia
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users