フィルターのクリア

Evaluation of image segmentation without using a model

3 ビュー (過去 30 日間)
Hend Abouche
Hend Abouche 2022 年 5 月 12 日
コメント済み: Image Analyst 2022 年 5 月 13 日
Hello guys, I've been trying to see who is better at image segmentation is it using only the green channel mask the whole image mask
here is my code for segmentation using green channel
I=imread(image);
g=I(:, :, 2);
%binarizing images
gg=imbinarize(rescale(g));
SE=strel('disk',5);
%green
gg=imopen(gg,SE);
gg=imdilate(gg,SE);
gg = bwareafilt(gg,1);
maskedRgbImageg= imoverlay(I,gg,'k');
my segmentation code using the whole image
I=imread(image);
gray=rgb2gray(I);
%binarizing images
graym=imbinarize(rescale(gray));
SE=strel('disk',5);
graym=imopen(graym,SE);
graym=imdilate(graym,SE);
graymmaskedRgbImageg= imoverlay(I,graym,'k');
and now I don't know how to evalute each one segmentation using the metrics, is there is any methode that can show me who segments better. thank you in advance
  2 件のコメント
DGM
DGM 2022 年 5 月 12 日
編集済み: DGM 2022 年 5 月 12 日
That's entirely dependent on the image, the content, and the intent. It's not clear what those are, and it's not clear what "the metrics" are either.
Just grabbing an offhand color image,
I get this:
I = imread('jagblobs.png');
g = I(:, :, 2);
%binarizing images
gg = imbinarize(rescale(g));
SE = strel('disk',5);
gg = imopen(gg,SE);
gg = imdilate(gg,SE);
gg = bwareafilt(gg,1);
maskedRgbImageg = imoverlay(I,gg,'k');
imshow(maskedRgbImageg)
... and this
I = imread('jagblobs.png');
gray = rgb2gray(I);
%binarizing images
graym = imbinarize(rescale(gray));
SE = strel('disk',5);
graym = imopen(graym,SE);
graym = imdilate(graym,SE);
graymmaskedRgbImageg = imoverlay(I,graym,'k');
imshow(graymmaskedRgbImageg)
Neither of which really help to make the intent clear (the approximate removal of the largest object, maybe?).
Hend Abouche
Hend Abouche 2022 年 5 月 13 日
yes I am using the bwareafilt function to keep only the largest object

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

採用された回答

Image Analyst
Image Analyst 2022 年 5 月 13 日
I would use whatever image gave you the most contrast in what you want to find. Usually a single color channel will give you the most contrast if you're looking for something that is a single color. If you want to find multiple colors simultaneously then useing rgb2gray would probably be best. You might even be able to use PCA to get more contrast. PCA Demos attached.
  4 件のコメント
Hend Abouche
Hend Abouche 2022 年 5 月 13 日
No I do have the ground truth of masks, I just need to find a way to find wich method gives the nearest mask shape to the ground truth
Image Analyst
Image Analyst 2022 年 5 月 13 日
You can use the dice function.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeRead, Write, and Modify Image についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by