Ask Your Question
0

Did JPEG 2000 saved in Lossless or Lossy

asked 2017-10-20 12:32:57 -0600

I'm currently looking to save images in JPEG 2000 using OpenCV, but since no parameters can be passed to the write for the JPEG 2000 format, what compression mode and compression ratio value is used by OpenCV ?

Thanks, PA

edit retag flag offensive close merge delete

Comments

1

Use png if you want to save lossless

sturkmen gravatar imagesturkmen ( 2017-10-20 12:39:32 -0600 )edit

I think that opencv use jasper library. Compression are set here but cannot be changed (without a PR) and set here .

LBerger gravatar imageLBerger ( 2017-10-20 13:04:25 -0600 )edit

Hi, maybe this can help you.

moHe gravatar imagemoHe ( 2017-10-22 03:01:01 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-08-15 02:37:46 -0600

TL;DR - Lossless.

OpenCV uses libjasper to implement JPEG 2000 encoding and decoding, and uses the defaults which is the 'Integer' mode (lossless). OpenCV does not pass any options to the Jasper encoding library other than 'JP2', which specifies the full JPEG 2000 container format, as opposed to 'JPC' which is the codestream format.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-10-20 12:32:57 -0600

Seen: 2,617 times

Last updated: Oct 20 '17