From: sdf on
Hi everyone,
My problem is the following: I have a picture, and I would like Matlab to plot only a specific color of it (for example black), in order to be able to see exactly where the zones covered with this specifiv color are located.
Does anyone of you know how this could be done ?
Thank you for your help !
From: ImageAnalyst on
On Apr 29, 9:51 am, "sdf " <jeanno...(a)hotmail.fr> wrote:
> Hi everyone,
> My problem is the following: I have a picture, and I would like Matlab to plot only a specific color of it (for example black), in order to be able to see exactly where the zones covered with this specifiv color are located..
> Does anyone of you know how this could be done ?
> Thank you for your help !

--------------------------------------------------------------------------------------------
First you have to define the "range" of your color, then create a
"map" (a binary image) of where pixels of those color(s) live. If you
want, you can mask your image by the "map" of where the black color is
so that it will show either the original, black, or white inside the
mapped regions, and show either the original, black, or white outside
the mapped regions. To do that simply use binary images to dot-
multiply against your original image.

This simple color detection script will help you a lot in finding your
"black" color. Just modify the thresholds to locate the black instead
of the red that I'm detecting in the demo.
http://www.mathworks.com/matlabcentral/fileexchange/26420-simplecolordetection
 | 
Pages: 1
Prev: Memory leakage
Next: Stand Alone exe