Error when decoding a jpeg file (Bugfix #4148)


Added by Yida Wang about 10 years ago. Updated almost 10 years ago.


Status:Cancelled Start date:2014-12-04
Priority:Normal Due date:
Assignee:- % Done:

50%

Category:-
Target version:-
Affected version:branch 'master' (3.0-dev) Operating System:Windows
Difficulty:Medium HW Platform:x64
Pull request:

Description

I have stumbled upon a quite disturbing issue while trying to compare my algorithm with a standard Matlab algorithm. The problem is that when reading my input image which is a jpeg image, I don't have the same data. The data are not very different, but they differ enough so that it is measurable.

Here is the image I am using : http://imgur.com/QwGMsgl

I am reading it using cv::imread with the latest master commit on git.

The 4th pixel of the 1st row is :
- (114,84,170) for Matlab or MS Paint
- (116,83,170) for OpenCV

Do you have an idea how I could check who is right and who is wrong here, and a pointer as to where I can correct it if OpenCV is at fault ?

No worry.
Different decompression algorithm in OpenCV and Matlab with jpeg iamges, it is usually applied eith the MATLAB decompression algorithm in particular issues


History

Updated by Yida Wang about 10 years ago

No worry.
Different decompression algorithm in OpenCV and Matlab with jpeg iamges, it is usually applied eith the MATLAB decompression algorithm in particular issues

Updated by Vadim Pisarevsky almost 10 years ago

jpeg standard does not demand bit-exact output from different codecs. So it can not be considered a bug. If you need bit-exactness, please, use lossless formats like .png

  • Status changed from New to Cancelled

Also available in: Atom PDF