Object recognition in binary Image

2 ビュー (過去 30 日間)
Florian Gloss
Florian Gloss 2020 年 10 月 20 日
コメント済み: Florian Gloss 2020 年 10 月 26 日
Hello,
the image attached is the binary version of my image. I want to detect the white part, as well as the black parts (in the white), which are holes in the white part and therefore represent the background in the binary image.
Can someone help me how to get the black areas in the White part and measure them or get their mean intensity.
Thank you very much!

採用された回答

Shashank Gupta
Shashank Gupta 2020 年 10 月 23 日
Hi Florian,
you can simply take out the black areas from the image by thresholding pixels values. Below is reference code for you to get headstart.
threshold = 50; % May need to change it, do experiment on this value and find the best suit for you.
imgThreshold = img < threshold;
The image imgThreshold will segment out the black portion and now you can find the mean intensity by simply using the mean function.
meanPixel = mean(imgThreshold);
I hope this gets you enough headstart to explore.
Cheers
  1 件のコメント
Florian Gloss
Florian Gloss 2020 年 10 月 26 日
Thanks a lot for your answer, but dont get how to exactly receive the mean Intensity value of every hole in the image listed...
Is there maybe a way to exactly measure the meanIntensity of every area (holes) found in the image?

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by