clustering image, grayscale image

2 ビュー (過去 30 日間)
Tomas
Tomas 2014 年 3 月 15 日
回答済み: Boni_Pl 2016 年 11 月 12 日
Hello, I have for example image
I want convert to grayscale image, and then use Kmeans method.
Does anyone help ?
Thanks.

回答 (2 件)

Image Analyst
Image Analyst 2014 年 3 月 15 日
Use rgb2gray() from the Image Processing Toolbox. Then kmeans() from the Statistical Toolbox. Here's a demo: http://www.mathworks.com/products/demos/image/color_seg_k/ipexhistology.html
  16 件のコメント
Image Analyst
Image Analyst 2014 年 3 月 16 日
Sorry I don't understand the language. I don't know what to click, and it started spewing out a bunch of stuff that I didn't know what it was into the command window. It went on for several minutes and I couldn't stop it, not even with control-C. I had to go into task manager to finally kill off MATLAB.
I suggest you try normal debugging operations to figure out what's going on.
Tomas
Tomas 2014 年 3 月 16 日
編集済み: Tomas 2014 年 3 月 16 日
Never mind, my program works correctly only when clustering image It takes a long time.
I need, show my output.
I have output in cell.
for example Z= {1438x1} {5800x1} {425x1} {45x1}
in Z{1} is [48] [ 55] [46] ......
in Z{2} is [78] [ 89] [94].....
in Z{3} is [ 120] [ 134] [ 158]...
in Z{4} is [ 210] [ 248] [255].....
how to convert cell, so I could see it as a image.

サインインしてコメントする。


Boni_Pl
Boni_Pl 2016 年 11 月 12 日
Please anyone upload a matlab code for kmeans clustering of an ultrasound image.

Community Treasure Hunt

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

Start Hunting!

Translated by