How to extract highest intensity area from a greyscale spectrogram?

조회 수: 6 (최근 30일)
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.

채택된 답변

Image Analyst
Image Analyst 2021년 1월 23일
You've given no criteria for how those areas are to be determined. You might want to use watershed() or superpixels(). Or use imbinarize() to segment on intensity (adaptive or global), or multithresh() for several global thresholds.
  댓글 수: 3
Image Analyst
Image Analyst 2021년 1월 23일
Oh, OK. I would have used blockproc() if you wanted rectangular blocks but glad you solved it somehow.
I'm attaching several blockproc() demos in case you're still interested.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

KALYAN ACHARJYA
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.
  2. Get the largest blob as per requirement. (bwareafilt function)
What does "Major Intensity" mean here?
  댓글 수: 5
KALYAN ACHARJYA
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
Claudio Eutizi 2021년 1월 23일
Yes I found that pixel you're talking about.
I managed to do what I asked to in this question.
Can you help me with this? Thank you so much.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Image Processing and Computer Vision에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by