How to use k means segmentation to segment color image without converting it into gray scale?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Architha L S
le 3 Mar 2018
Commenté : Architha L S
le 5 Mar 2018
We are doing project on soil colour detection.Suppose in the image we have soil,trees & sky we should eliminate sky and trees and get only soil image for further processing. Which segmentation will be good for? Can we use k means? If yes please some one send k means algorithm for colour image processing. We tried with so many codes but we are able to get gray images.how to convert them back to rgb?
0 commentaires
Réponse acceptée
Image Analyst
le 3 Mar 2018
There are several ways of doing this. See my attached demos on kmeans() and classify().
kmeans() is usually a bad way to classify, as you'll see. Plus it's not robust since how well it works depends on how many of the colors you want are in your photo. Better is to do color segmentation like I do in my demos in my File Exchange. https://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862&sort=downloads_desc
Plus de réponses (1)
Ahmet Cecen
le 3 Mar 2018
Read K-Means, especially the part about "X" (the input). An image is simply a 3 dimensional dataset. You should be able to figure out the next steps.
0 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!