How to Find Bit Error Rate for an Image?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am working in a project and I do not know how to get the BER between my orignal image and the one received.
so basically If do this
A=imread('m.jpg)
B=imread('m.jpg)
(n,R)=biterr(a,b)
I should get zero ber but this method is not working for me and i am getting an error message. Can somebody help please.
Thanks
4 comentarios
Walter Roberson
el 10 de Abr. de 2012
Editada: Walter Roberson
el 12 de Jun. de 2020
Actually biterr() *is* a MATLAB function
You need to tell us what the error message is.
Please also tell us class(A), class(B), size(A), size(B)
Respuestas (1)
Tasos Giannoulis
el 27 de En. de 2017
You are receiving this error because your inputs are 3-dimensional, while BITERR works at most with 2-D data.
More important, BITERR works with the equivalent binary representation. For example,
>> biterr(8, 7)
ans =
4
because 8 = 1000 and 7 = 0111, therefore all 4 bits are different.
Is this what you want? Or do you want to count the number of "pixels" that are different? If your goal is the latter, then you can use this code:
>> sum( sum( A ~= B ) ) / numel(A)
which counts the number of differing numbers and calculates their ratio.
1 comentario
Ver también
Categorías
Más información sobre Signal Processing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!