segmenting objects by their different intensity using MatLab

10 views (last 30 days)
please view the image below for a clearer idea what I am about to ask.
I believe all of you can see the number of books in this image, which is 3. I have tried segmenting them according to their intensity, watershed. Even using Canny was not really successful due to the noises. But all in all, with the exception of canny, the image always look something like that(See the left picture):
Where all the books are clustered together. My aim is to ultimately separate them and use bwboundaries to count the number of books. I was also trying out label2rgb to further differentiate the books, however, all that happened that its was only one colour, meaning MatLab took it as all 3 books are the same.
I have done this on hardcover books with great success, however as this books are not hard cover, there isn't a distinct line to separate each of them.
I been trying to segment this image without success for a few days. Any ideas? Any suggestions or ideas are welcomed.

Answers (1)

Image Analyst
Image Analyst on 28 Oct 2013
You might want to make up the 3D histogram (color gamut), and then use clustering like Brett does here: http://www.mathworks.com/matlabcentral/fileexchange/35014-clusterdata Once you have rough classification based on color, then you can clean up defects with traditional spatial processing methods, like hole-filling, etc.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!