Skip to content

BensonHuangTW/Simple_CPP_Baseline_JPEG_Encoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Baseline JPEG Encoder

This goal of this repository is to provide simple codes of high readibility for fully understanding the encoding process of baseline JPEG. The implememtation was inspired by TheIllusionistMirage's JPEG decoder repository. Image processing related operations use OpenCV library for higher readibilty. You can refer to it's official documentation for more details.

Building

Go to the repostiry directory and execute the following commands in shell:

$ mkdir build && cd build
$ cmake ..
$ make

Dependency

You need to install OpenCV to build the executable.

Usage

print help

$ ./cppeg -h

Compress Image into JPEG File

$ ./kpeg input_img_path [optional_output_path]

Suppose our input image's path is sample.jpg and we don't denote the output path of the compressed JPEG file. Then, the output JPEG file will have the name sample_compressed.jpg.

Reference

[1] Recommendation T.81 (09/92): Information technology—Digital compression and coding of continuous-tone still images—Requirements and guidelines

[2] Koushtav Chakrabarty's JPEG Decoder Guide [blog]

[3] OpenCV documentation [website]

About

A baseline JPEG encoder implemented by C++.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published