How can I work out signal to noise ratio of doppler waveform images? Any possible way?
1 次查看(过去 30 天)
显示 更早的评论
回答(1 个)
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.
0 个评论
另请参阅
类别
在 Help Center 和 File 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!