i want to extract the region of particular color..i am using FRED'S 'locatecolor' script. i try this script on below image:
Code: Select all
<?php echo shell_exec('sh locatecolors.sh -b "rgb(237,28,36)" -e "rgb(100,50,50)" -m or shape.png cshape.png '); ?>
ang got this output:
which i got as expected since i am giving beginning color rgb(237,28,36) which is red which i got from original image and end color "rgb(100,50,50)" i tried the end color value like
rgb(237,28,36),rgb(200,20,20),rgb(100,0,0) its works. and giving red region.
same i applied to extract the yellow region as below:
Code: Select all
echo shell_exec('sh locatecolors.sh -b "rgb(255,242,0)" -e "rgb(200,200,120)" -m or shape.png cshape.png ');
which not as per my expectation..
i am giving "rgb(255,242,0)" as yellow color which i got from original image . i am not getting the second i.e end color i tried other values for that end color but not works..
can u please tell me what should be the end color value for getting yellow region..and what is the technique for giving that color
i am getting this result by
Code: Select all
echo exec('convert shape.png -fill none +opaque "rgb(255,242,0)" cshape.png ');