MATLAB Answers

Error while using JBIG compression.

3 views (last 30 days)
Manikandan VM
Manikandan VM on 7 Mar 2017
I need to compression a binary image(matrix of size RxC) in a lossless manner. For this I hope I can use JBIG compression, and I have downloaded the toolbox from the following link.
https://in.mathworks.com/matlabcentral/fileexchange/5104-toolbox-wavelets/content/toolbox_wavelets/perform_jbig_coding.m
I added the extracted folder to Matlab path, and I tried to call the perform_jbig_coding function in the following way
[y, nbr_bits]=perform_jbig_coding(x);
please note that x I defined as a random binary matrix of size 256x256 bits.
But while using this I am getting the following error :
_ _ 'pbmtojbg' is not recognized as an internal or external command, operable program or batch file. Error using perform_jbig_coding (line 22) Unable to open Jbig file.__
Anyone can help me to resolve this error? or Anybody can share the JBIG pure matlab code for compression and decompression?

  0 Comments

Sign in to comment.

Answers (1)

Carlos Alejandro Peñuelas Angulo
Hi. Probably it is too late but this answer could be useful for other Matlab users.
Specifically for this situation, inside the function that you mentioned, the code calls two external programs 'pbmtojbg.exe' and 'jbgtopbm.exe'. The header of the function says: "It requires pbmtojbg and jbgtopbm executable." that can be generated running the make fine contained in the JBIG-KIT library that can be found at: JBIG-KIT.
Instructions to generate those executables can be found at: JBIG-KIT Instructions.
I hope this information can help someone and, if you need help, you can ask anything. This process helped me to use the jbigkit library and the mentioned function in my matlab projects.

  0 Comments

Sign in to comment.


Translated by