Extracting information from an image

7 views (last 30 days)
Sunil
Sunil on 21 Aug 2014
Answered: Image Analyst on 21 Aug 2014
Hi, I have a TFD image and should extract the energy in a search grid. For example, i have attached a time frequency distribution image in which the highest energy signal is within the range 50-100 (x-axis is frequency, y-axis is time). So i should have a search grid between 50-100 (x-axis), find its corresponding y-axis coordinates (10-50) and its total energy within this grid. Can someone help me with this??

Answers (1)

Image Analyst
Image Analyst on 21 Aug 2014
Try this (untested)
subImage = yourImage(10:50, 50:100) % Extract search area region of interest.
[rows, columns] = size(subImage) % Get size.
maxValue = max(subImage) % Get maximum value of image in the search area.
location = (subImage == maxValue) % 2-D binary map showing location of max value.
[maxRow, maxCol] = ind2sub([rows, columns], location) % Row & Col of max value
totalEnergy = sum(subImage(:)) % Sum up all values in ROI to get total energy

Community Treasure Hunt

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

Start Hunting!