项目作者: sachinkumarsingh092

项目描述 :
Few filters for 24-bit uncompressed bitmap images.
高级语言: C
项目地址: git://github.com/sachinkumarsingh092/bitmap-filter.git
创建时间: 2020-01-30T16:02:28Z
项目社区:https://github.com/sachinkumarsingh092/bitmap-filter

开源协议:GNU General Public License v3.0

下载


bitmap-filter

License

Filters for 24 bit uncompressed bitmap images. Available filters are:

  • Grayscale - Converts the image into a single sample containing only intensity information.

  • Reflect - Converts the image into its mirror image.

  • Blur - Blurs the image.

  • Edge - Highlights the edges in the image. It uses basic sobel operator to detect the edges.

Installation

  • Clone the repository.
    1. $ git clone https://github.com/sachinkumarsingh092/bitmap-filter.git
  • Change the current directory to bitmap-filter
    1. $ cd bitmap-filter
  • Use make to build the executable.
    1. $ make
    If you want to remove the executable, use the clean target in make
    1. $ make clean
    You will need to install clang if not already available. To use gcc compiler make changes in Makefile accordingly.

Usage

Original Image:

Grayscale

  1. ./filter -g input.bmp output.bmp

Refect

  1. $ ./filter -r input.bmp output.bmp

Blur

  1. $ ./filter -b input.bmp output.bmp

@1470958627655/Lena-image-blurred-by-7-2-7-out-of-focus-kernel.png" width="412" height="412" />

Edge

  1. $ ./filter -e input.bmp output.bmp

To-Do

  • Write a help option.
  • Write a function/script to check the compatibility of the image to be converted.