필터 지우기
필터 지우기

Difference between calculating psnr in uint8 and double.

조회 수: 3 (최근 30일)
Sudeep Albal
Sudeep Albal 2017년 1월 27일
답변: Walter Roberson 2017년 1월 27일
I have implemented a data hiding algorithm(multilevel histogram modification and sequential recovery).I am getting psnr about 30 if calculated with respect to images in double and 10 psnr if calculated with uint8. Should I proceed with psnr in double or not?

답변 (2개)

KSSV
KSSV 2017년 1월 27일
uint8 is used unsigned 8 bit integer. It is easy to convert double to uint8 or otherway.
let say I have matrix of uin8 A.
then to convert it to double use:
A = double(A);
and to convert it back to uint8 use:
A = uint8(A);

Walter Roberson
Walter Roberson 2017년 1월 27일
Psnr involves subtraction. But if you subtract a larger uint8 from a smaller you get 0 rather than a negative number. That makes it look like the locations were the same when they are not.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by