Skip to content

josejuansanchez/cr_mc_j2k

Repository files navigation

cr_mc_j2k

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:

/vagrant/src/Kakadu

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:

$CR_MC_J2K_HOME/data/sequences

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:

$CR_MC_J2K_HOME/data/j2c_and_thumbnails

Clean old and temp files:

$CR_MC_J2K_HOME/data/scripts./clean_pgm_j2c.sh

1) Compress the sequence to JPEG2000

Example:

$CR_MC_J2K_HOME/data/scripts/process_speedway_layers-8_levels-2_precincts-64-32-16_blk-16.sh

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:

$CR_MC_J2K_HOME/config/sequences

Example:

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

3) Update the config file config/cr_mc_config.sh

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

Example:

...
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/create_all_knapsack_files.sh 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$ ./create_temp_directories.sh

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:

  • clean.sh

This script removes temporary files from previous simulations.

  • sequencial.sh

Example:

$ $CR_MC_J2K_HOME/scripts$ ./sequential.sh 1 900 5000
  • evaluate_bitrates.sh

Example:

$ $CR_MC_J2K_HOME/scripts$ ./evaluate_bitrates.sh

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

Example:

EXPERIMENTS=$CR_MC_J2K_HOME/experiments/2018/2018_11_05_speedway_layers-8_levels-2_precincts_64-32-16_blk-16_with_me_a0_v2_mode_0

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.

About

Conditional Replenishment and Motion Compensation based on JPEG2000

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published