How to plot time intensity curves from doppler waveform images?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
How to plot time intensity curves from doppler waveform images? Basically I want to work out the intensity of each beat on the doppler and plot how the colour intensity changes over a 5 minute period (there will probably be about 600 beats during a 5 minute period so to manually select 600 beats and find out the average brightness will be too time consuming). Is there a more automated way to do this? I have software which can put a blue line that traces the doppler so basically work out average intensity below that line for each beat.
2 comentarios
Image Analyst
el 19 de Feb. de 2022
What data do you have? Numerical data? A text file of numbers? A workbook with the signal in it? An RGB image like you have above? What is the form of the best possible data you can export from your instrument?
Attach it with the paperclip icon after you read this:
Respuestas (2)
Avni Agrawal
el 9 de Feb. de 2024
Hi Samay,
I understand that you are trying to plot time intenstiy curves from doppler waveform images.The Doppler-Time Intensity Scope block creates a scrolling display of Doppler response intensities as a function of time. The input consists of Doppler responses for a pulse or FMCW signal. Each frame of data creates a new line on the scope. The scope serves only as a display of the Doppler response. Using the response as input corresponds to setting the IQDataInput property of the phased.DTIScope System objec to false.
Please take a look at this documentation for better understanding: https://www.mathworks.com/help/phased/ref/dopplertimeintensityscope.html
0 comentarios
Brahmadev
el 9 de Feb. de 2024
As per my understanding, you have '.wmv' file that you would like to read it 600 times in 5 minutes. Post this, you would like to find an average of of the doppler traces of all the beats. Without the data used for plotting the traces, this can be done by taking the average of the pixels, given that the color of the trace is known.
fileName = 'dopplerWaveform.wmv'; % Change filename to your file name.
v = VideoReader(filename, 'VideoFormat', 'Grayscale'); % Read image as Grayscale
VideoLength = length(read(v))/30; % Length of video in seconds
FrameToRead = 600;
firstFrame = read(v, 1);
runningAverage = zeros(1, length(firstFrame)); % Defining an array of the length of the video in pixels
% Iterating through the frames
for k = 1:VideoLength
videoFrame = read(v, 30*k); % reads every 30th frame in v, so that we get two samples per second (or 600 samples in 5 minutes)
% Create the trace using software that you have mentioned above. This
% can also be done using Edge Detection. Now the frame dimensions
% become H-by-W-by-3
H = size(videoFrame, 1);
W = size(videoFrame, 2); % == length(firstFrame)
% Assuming the color of the trace is known
colorTrace = [0, 255, 255]; % Replace with the color of trace in your case.
TraceVal = zeros(1, length(firstFrame));
% Iterate through each image and find the pixels with the color colorTrace
for y = 1:H
for x = 1:W
if videoFrame(H, W, :) == colorTrace
TraceVal(x) = y;
break;
end
end
end
runningAverage = runningAverage+TraceVal;
end
runningAverage = runningAverage/600;
Using this method an average for the trace over multiple beats can be created. Further this can be plotted to visualize the average. Also, you can refer to the following documentations for more information on the functions used:
- "VideoReader": https://www.mathworks.com/help/matlab/ref/videoreader.html
- "read": https://www.mathworks.com/help/matlab/ref/videoreader.read.html
Hope this helps in resolving your query!
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!