How to extract highest intensity area from a greyscale spectrogram?
古いコメントを表示
Hello.
I got greyscale mel-spectrograms images from a dataset and I want to divide it into several areas and to obtain the area where pixels have highest intensity in average.
This will be useful to label the images with rectangles for a deep learning training.
Hope somebody will help me.
I attach a greyscale spectrogram I got where you can show me the way to do it.
Thank you.
採用された回答
その他の回答 (1 件)
KALYAN ACHARJYA
2021 年 1 月 22 日
編集済み: KALYAN ACHARJYA
2021 年 1 月 22 日
1 投票
- Apply thresholding to cluster the image into two segment, certain higher pixel and lower value pixels.
- Get the largest blob as per requirement. (bwareafilt function)
What does "Major Intensity" mean here?
5 件のコメント
Claudio Eutizi
2021 年 1 月 22 日
KALYAN ACHARJYA
2021 年 1 月 22 日
編集済み: KALYAN ACHARJYA
2021 年 1 月 22 日
Lets say, the grayscale image is grayImage
temp=grayImage;
extract_roi=grayImage==max(grayImage(:));
temp(~extract_roi)=0;
imshow(temp); % Extracted ROI Image as temp variable
Claudio Eutizi
2021 年 1 月 22 日
編集済み: Claudio Eutizi
2021 年 1 月 22 日
KALYAN ACHARJYA
2021 年 1 月 23 日
編集済み: KALYAN ACHARJYA
2021 年 1 月 23 日
"but this code you wrote here shows a black image".
Most probably, there is only one maximum value pixel, so it is not easily visualized (check carefully). You can confirm the same with the extract_roi matrix, which must be the non-zero matrix.
Claudio Eutizi
2021 年 1 月 23 日
カテゴリ
ヘルプ センター および File Exchange で Deep Learning Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
