Path: news.mathworks.com!not-for-mail
From: "rubionelove " <rubionelove@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: color based segmentation
Date: Fri, 3 Jul 2009 10:03:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 40
Message-ID: <h2kl0l$t93$1@fred.mathworks.com>
References: <h2i2b1$2aq$1@fred.mathworks.com> <h2ibl5$ljm$1@fred.mathworks.com> <99c29e24-3af6-4bba-878f-a12fc3c127d7@r16g2000vbn.googlegroups.com>
Reply-To: "rubionelove " <rubionelove@gmail.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1246615381 29987 172.30.248.37 (3 Jul 2009 10:03:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 3 Jul 2009 10:03:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1839844
Xref: news.mathworks.com comp.soft-sys.matlab:552653


ok I try to explain clearly

this is my original image named Im

http://www.flickr.com/photos/andreconte/3683396613/sizes/l/
----------------------------
then I apply a treshold to each colorplane and I recombine in one binary image

imR = squeeze(Im(:,:,1));
imG = squeeze(Im(:,:,2));
imB = squeeze(Im(:,:,3));

imBinaryR = im2bw(imR,graythresh(imR));
imBinaryG = im2bw(imG,graythresh(imG));
imBinaryB = im2bw(imB,graythresh(imB));
imBinary = imcomplement(imBinaryR&imBinaryG&imBinaryB);

result :
http://www.flickr.com/photos/andreconte/3683396643/sizes/l/
----------------------------
I made a ROI mask for all the sequence

http://www.flickr.com/photos/andreconte/3684208260/sizes/l/
----------------------------
after that I fill holes with 'imfill' function
the final result is

http://www.flickr.com/photos/andreconte/3683396699/sizes/l/

-------------------------

now I would like to identify separates blob for each region that have similar colour in this image

http://www.flickr.com/photos/andreconte/3683439445/sizes/m/

Is it possible to make it with a simple approach (color segmentation and edge detection)?
I would avoid machine learning on car features because is too much complicated for the experience I have.

Thank you for your advices Imageanalyst
best regards