You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Голиков Иван a3cebabb32 Merge branch 'feature/readme-update' of ivnglkv/gblur into master 1 year ago
examples Created example images 1 year ago
gaussian_blur Checking for pointer values after malloc and realloc 5 years ago
.gitignore Initial commit 5 years ago
CMakeLists.txt Initial commit 5 years ago
LICENSE Initial commit 5 years ago
Makefile Initial commit 5 years ago
README.md Simplified example of usage 1 year ago
main.c Overwriting original file, if no output file were specified; closing files than they are no longer needed. 5 years ago

README.md

Gaussian blur

This simple program performs a gaussian blur on given image, using «sliding window» technique, which allows to compute resulting image with O(n × M × N ) + O(m × M × N ) complexity, where M × N stands for input image dimensions and m, n stands for 6 * sigma (sigma is passed as a parameter to program).

Here is the example of program usage result.

Original image:

Original image

GIMP Gaussian blur (radius = 15):

GIMP

Gblur (sigma = 5):

gblur

Downloading

You can clone this repo with git:

git clone https://git.ivnglkv.ru/ivnglkv/gblur.git

Dependencies

This program uses libjpeg library.

Compiling

In order to build this program you should have cmake and make installed. Also install development headers for libjpeg library.

After that, build it with

make

Output binary will be placed into build directory.

Usage

gblur -i input_file [-o output_file] [-s radius] [-h]

Options:

-i: path to file with input RGB JPEG image.
-o: path to file where blured RGB JPEG image will be recorded. If no path will be specified, input file will be overwritten!
-s: radius of blur. Default is 5.
-h: show this help.

Example of usage:

gblur -i img.jpg -o blured_img.jpg -s 5

License

Copyright (c) 2016, Golikov Ivan

Licensed under The BSD-3 Clause License