Skip to content

Remove 8x8-pixel artifacts from JPEGs.

License

Notifications You must be signed in to change notification settings

camilleg/unblock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UnBlock

Remove 8x8-pixel "blocky" artifacts from a heavily compressed JPEG image.

How to build on Ubuntu 18 through 22

sudo apt install g++ libpng-dev make

make

This also works on Windows 10 or 11, within WSL.

How to run

./unblock in.bmp out.bmp

./unblock in.png out.png

How to test

make test

Software used

This is a wrapper around an algorithm by John Costella. His webpage includes before-and-after pictures showing the algorithm's effectiveness.

Instead of porting John's C# source code to C/C++, I built on Alexander Balakhnin's C port, in the context of a plugin for AviSynth, based on John's own 2007 C port of "the Costella libraries."

Files in .bmp format are read and written by EasyBMP, files in .png format by libpng. Why not .jpg for a JPEG utility? Because my source images are still frames from mjpeg-format video. Extracting frames in a lossless format avoids the further degradation that happens with ffmpeg -i in.avi -vcodec jpg ....

The journal article Stitched Panoramas from Low-Cost Airborne Video Cameras demonstrates an application of this software. The article is summarized in the MIT Technology Review.

Bugs

An image whose width is not a multiple of 16 pixels may misbehave.

About

Remove 8x8-pixel artifacts from JPEGs.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages