What is meant by imdilate?

11 ビュー (過去 30 日間)
Frhnh R
Frhnh R 2021 年 1 月 16 日
コメント済み: Frhnh R 2021 年 1 月 17 日
Hi, can i know what is meant by:
(imdilate(L == 0, ones(3,3))
What is L == 0?
and ones(3,3)
This can be found in marker controlled watershed segmentation algorithm.
Thank you very much.
gradmag2 = imimposemin(gradmag, bgm | fgm4);
L = watershed(gradmag2);
I4 = I;
I4(imdilate(L == 0, ones(3, 3)) | bgm | fgm4) = 255;
figure, imshow(I4), title('Markers and object boundaries superimposed on original image (I4)');
  1 件のコメント
Ive J
Ive J 2021 年 1 月 16 日
If you are not familiar with MATLAB basics, please take a look at:
https://se.mathworks.com/help/matlab/getting-started-with-matlab.html

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

採用された回答

Image Analyst
Image Analyst 2021 年 1 月 16 日
L is a labeled image. A label of 0 means an unlabeled region, usually the background, though I'm not sure the labeled image coming from a watershed would have any background.
It sets I4 to the original image and then
So then it dilates (expands) the background region. Then it takes any true values in the other binary imagesbgm and fgm4 and combines them to form a mask of all three images ORed together. Any pixels in the I4 image that are where the combined mask are white will also be set to white.
So basically it takes a bunch of regions and sets a gray scale image to white in those regions.
  1 件のコメント
Frhnh R
Frhnh R 2021 年 1 月 17 日
Thank you very much. I really appreciate your answer.

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by