How to calculate bit error rate of two images?

2 ビュー (過去 30 日間)
sami ullah
sami ullah 2021 年 3 月 4 日
コメント済み: Bjorn Gustavsson 2021 年 3 月 4 日
I have the Formula that i want to implement in Matlab..

回答 (1 件)

Bjorn Gustavsson
Bjorn Gustavsson 2021 年 3 月 4 日
xor is only really defined for a logical data-type, right? So what you want is to check the difference between each pixel in the two images? Then, if you have images in some comfortable data-type, like uint8, you want to figure out how many bits each difference corresponds to?
2 suggestions:
Have a look at:
absdI = abs(Im1-Im2);
and this should also be a useful hint:
[x1,x2,x3,x4] = ndgrid(0:1);
disp([(0:15)',x4(:),x3(:),x2(:),x1(:),sum([x4(:),x3(:),x2(:),x1(:)],2)])
HTH
  2 件のコメント
sami ullah
sami ullah 2021 年 3 月 4 日
i have uint8 i.e 0 to 255 values in the images. i think, xor between two images will give logical values.
Bjorn Gustavsson
Bjorn Gustavsson 2021 年 3 月 4 日
Well you might think whatever you want. If you check the help for xor you will learn what it will return. You can also check what it actually does:
xor(uint8(7),uint8(15))
You can also have a look at the help for bitxor.

サインインしてコメントする。

製品


リリース

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by