필터 지우기
필터 지우기

clustering the image using k menas.

조회 수: 1 (최근 30일)
Tomas
Tomas 2014년 3월 17일
댓글: Walter Roberson 2014년 3월 20일
Hello, i have to clustering, greyscale and rgb image,
what is the procedure for clustering image ?
IDX = kmeans(X,k) is defined kmeans.
what is X in kmeans as input in the image ?
Thanks.

답변 (1개)

Image Analyst
Image Analyst 2014년 3월 17일
As background for others who wanted to try something with the Statistics Toolbox (which I don't have), I suggested a 1D vector of all the image gray level values, grayImage(:), for his "X" in http://www.mathworks.com/matlabcentral/answers/121795#comment_202439. But I couldn't test it for him because I don't have the Stats toolbox.
  댓글 수: 2
Tomas
Tomas 2014년 3월 17일
if so I'll try writes error
??? Error using ==> kmeans>batchUpdate at 436
Empty cluster created at iteration 1.
Error in ==> kmeans at 337
converged = batchUpdate();
Error in ==> Untitled3 at 29
[IDX,ctrs] = kmeans(grayImage(:),3)

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by