Undefined function 'imsegkmeans' for input arguments of type 'uint8'.

1 回表示 (過去 30 日間)
University
University 2023 年 8 月 21 日
コメント済み: University 2023 年 8 月 21 日
I'm using 2023a version of matlab. I want to use the "'imsegkmeans'" function but I received an error: Undefined function 'imsegkmeans' for input arguments of type 'uint8'.

回答 (2 件)

Walter Roberson
Walter Roberson 2023 年 8 月 21 日
That is part of the Image Processing Toolbox (since R2018b)
  1 件のコメント
University
University 2023 年 8 月 21 日
Thank you Walter. Please which function can used aside "'imsegkmeans'"?

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


Image Analyst
Image Analyst 2023 年 8 月 21 日
I don't like that function anyway. K-means is not what you want to do unless you have a good supply of each class in each image. For example, let's say you have 3 classes: background, healthy leaf, and diseased leaf. What is it going to do when it has only good leaf and background, and no disease pixels? Even though there are 3 classes, it's going to be forced to find 3 classes (if that's what you told it), and it will find 3, when you're hoping it would tell you that there are just two classes (healthy leaf and background).
What you should (or can) do is to use discriminant analysis to find the classes. You build a training set by showing/telling it which pixels belong to each class. You do this over many images to get a good representation of what each class looks like (its centroid and shape or extent). Then you use that trained classifier to grade your unknown test images. NOW it will find each class fairly accurately, and if there is no disease, you'll see that, because there will be no disease pixels found.
See my attached demo.

カテゴリ

Help Center および File ExchangeAgriculture についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by