agl / jbig2enc

JBIG2 Encoder
Other
251 stars 86 forks source link

Compression Ratio being lower for JBIG2 than JBIG1 ???!!! #81

Open Sahil-5111998 opened 1 year ago

Sahil-5111998 commented 1 year ago

I am currently working on the compression of binary images. There is an algorithm that I am trying to test and compare its compression ratio to JBIG2 encoded images.

I am getting into a problem, and I am hoping that you might be able to help me here. I want to compute the compression ratio of certain images using my algorithm and computer them to standards JBIG1 and JBIG2. For JBIG1, I am using JBIG-kit (from Markus K) and jbig2enc for JBIG2 compression. However, the size of the encoded JBIG2 file (.jb2) is similar to that of the JBIG1 (.jbg) encoder. This should not happen as JBIG2 should give at least 2-3 times smaller results. I am giving a .pbm image as input for both encoders, and in some cases, the JBIG1 encoder is giving me a lower size.

For generating the jb2 encoded file I am using the command: $ jbig2 -s a.pbm > a.jb2