Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Conditional Replenishment and Motion Compensation based on JPEG2000.

This is a work in progress.

Compiling instructions

0) Include the Kakadu SDK in the project

Kakadu SDK is needed in order to compile some tools used in this project.

KaKadu SDK has to be located in the next directory:


1) Compile Kakadu

Example of how to compile Kakadu (version: v6_4_1-00305L) on Linux:

$ /vagrant/src/Kakadu/v6_4_1-00305L/make/make -f Makefile-Linux-x86-64-gcc

2) Set the LD_LIBRARY_PATH variable

$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/vagrant/src/Kakadu/v6_4_1-00305L/lib/Linux-x86-64-gcc

3) Set the PATH variable

$ export PATH=$PATH:/vagrant/src/Kakadu/v6_4_1-00305L/bin/Linux-x86-64-gcc

4) Set the CR_MC_J2K_HOME global variable

$ export CR_MC_J2K_HOME=/vagrant

5) Compile all the tools of the project

You can compile all the tools of the project using the Makefile located in the directory $CR_MC_J2K_HOME/make/.

$ cd $CR_MC_J2K_HOME/make/
$ make

How to use

0) Add the directory with the source images

The source images (e.g. PGM) have to be located in the next directory:


In the directory cr_mc_j2k/data/scripts there are some scripts that can be useful in order to process the source images and prepare them for the experiments.

The compressed JPEG2000 images (J2C) have to be located in the directory:


Clean old and temp files:


1) Compress the sequence to JPEG2000



2) Create a config file for the sequence

Create a configuration file that includes all the parameters for running scripts and store it in the directory:




3) Update the config file config/

Once you have created the file you have to update the $CR_MC_J2K_HOME/config/ file to specify which configuration file have to be used.


source $CR_MC_J2K_HOME/config/sequences/speedway_layers-8_levels-2_precincts-64-32-16_blk-16.cfg

4) Create the Kanpsack files (JSON) (Only for knapsack mode)

Example of how to create the Knapsack files for a sequence of images composed by 900 frames (from frame 1 until frame 900):

$ $CR_MC_J2K_HOME/knapsack/tools/create_all_kanpsack_files/ 1 900

Note that you don't have to start in the frame 1, you can specify the number of the first frame where you can to start.

5) Create temporary directories

$ $CR_MC_J2K_HOME/scripts$ ./

6) Run the scripts!

Use the scripts located in the $CR_MC_J2K_HOME/scripts to perform a simulation.

You can use the following scripts:


This script removes temporary files from previous simulations.



$ $CR_MC_J2K_HOME/scripts$ ./ 1 900 5000


$ $CR_MC_J2K_HOME/scripts$ ./

The results of the simulation created with this script will be stored in a directory that should be indicated in the EXPERIMENTS variable.



Creative Commons License
This work by José Juan Sánchez Hernández, Juan Pablo García Ortiz and Vicente González Ruiz is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.


Conditional Replenishment and Motion Compensation based on JPEG2000



No releases published


No packages published