Why am I receiving this error message about k means ?

조회 수: 1 (최근 30일)
MINO GEORGE
MINO GEORGE 2021년 6월 22일
답변: Image Analyst 2021년 6월 23일
Error using kmeans
Too many input arguments.
Error in kmeans_grayscale_segmentation (line 53)
[clusterIndexes, clusterCenters] = kmeans(grayLevels, numberOfClusters,...
Any help is appreciated
  댓글 수: 3
Scott MacKenzie
Scott MacKenzie 2021년 6월 22일
What's the complete line of code here:
[clusterIndexes, clusterCenters] = kmeans(grayLevels, numberOfClusters,...
Obviously, that's where the error is occurring, but unless you provide all the code, or at least all the code where the error occurs, it's hard to say.
Image Analyst
Image Analyst 2021년 6월 23일
It's
'distance', 'sqEuclidean', ...
'Replicates', 2);

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

채택된 답변

Image Analyst
Image Analyst 2021년 6월 23일
My original demo, from which that code comes, is attached. I just ran it and it runs fine. You must have modified (broke) it somehow.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by