Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Evaluation of 2 frames after encoding/decoding

Hi everyone,

Another question, I capture 2 frames and then I obtain the absolute error of them:

//// After capturing 2 frames
Mat frame1, frame2;
absdiff(frame1,frame2,error);

Everything ok at this point. But later I need to encoder/decoder the image and the evaluate that result with the first error (for obtain the PSNR for example) imwrite("error.jpeg",error); Mat error2 = imread("error.jpeg");

The problem here is error2 and error1 are different. I tried everything without success, but I cant understand why for example

Mat error3 = error2 - error1; //// Show an error of not equal size of the matrix.

I dont know what yo do. Did someone could help me? Thank you very much.