How can I work out signal to noise ratio of doppler waveform images? Any possible way?

조회 수: 1 (최근 30일)

답변 (1개)

Nithin
Nithin 2023년 12월 19일
Hi Samay,
I understand that you want to find the SNR (Signal to Noise Ratio) of the given doppler waveform image.
To implement this, kindly refer to the following code snippet:
image = imread('q1.png'); % Reading the provided image
if size(image, 3) == 3 % converting the image into grayscale
grayImage = rgb2gray(image);
else
grayImage = image;
end
image_size = size(grayImage);
disp(['Image dimensions: ', num2str(image_size)]);
signal_region = grayImage(50:150, 100:500); % using the grayscale image for region extraction
noise_region = grayImage(291:391, 100:500); % Adjusting the noise region indices to be within the bounds of the image
% Computation of mean and standard deviation:
signal_mean = mean(double(signal_region(:)));
noise_std = std(double(noise_region(:)));
if noise_std ~= 0
snr_dB = 20 * log10(signal_mean / noise_std); % calculation of SNR in dB
disp(['SNR of Doppler waveform image: ', num2str(snr_dB), ' dB']);
else
disp('Noise standard deviation is zero, SNR cannot be calculated.');
end
For more information regarding “imread”, “rgb2gray”, “size” and “std”, kindly refer to the following documentation:
I hope this answer helps you.
Regards,
Nithin Kumar.

카테고리

Help CenterFile Exchange에서 Detection, Range and Doppler Estimation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by