I am filtering an image and I would like to know the SNR. I tried with the scipy function scipy.stats.signaltonoise() but I get an array of numbers and I don't really know what I am getting.
Is there any other way to get te SNR of my image?
Join Stack Overflow to learn, share knowledge, and build your career.
I am filtering an image and I would like to know the SNR. I tried with the scipy function scipy.stats.signaltonoise() but I get an array of numbers and I don't really know what I am getting.
Is there any other way to get te SNR of my image?
The reason you are getting an array back rather than a single number, is because you haven't specified axis=None
in your call to scipy.stats.signaltonoise
.
Thus, you probably needed this:
snr = scipy.stats.signaltonoise(img, axis=None)
Without that option, you will get the SNR for every column in the image. This makes a lot of sense when the data is not actually an image, but a sequence of time signals for example.
mean
values and standard deviations. But without more information of your image, we cannot really help: your question is not so well-defined. – Oliver W. Aug 27 '14 at 10:16