C++ project oriented on interaction with images
A console application that allows to apply various filters to images, similar to filters in popular graphic editors.
The input and output image files must be in BMP format.
The BMP format supports quite a lot of variations, but in this task will be used
24-bit BMP without compression and without a color table. Type of used DIB header - BITMAPINFOHEADER.
An example of a file in the desired format is available in the Wikipedia article in the "Example 1" section.
When testing, be sure to pay attention to the fact that the test image was saved in a 24-bit BMP.
Description of the format of command line arguments:
{name} {path to a input file} {path to a output file} [-{filter name 1} [filter parameter 1] [filter parameters 2] ...] [-{filter name 2} [filter parameter 1] [filter parameter 2] ...] ...
cmake -B build -S . -D CMAKE_BUILD_TYPE=Release
cmake --build build
./image_processor input.bmp /tmp/output.bmp -crop 800 600 -gs -blur 0.5
In this example
- An image is loaded from a file
input.bmp - It is cropped to an image with the beginning in the upper left corner and the size of 800x600 pixels
- Transfers to shades of gray
- A blur with sigma 0.5 is applied
- The resulting image is saved to a file
/tmp/output.bmp
The filter list may be empty, then the image must be saved unchanged. Filters are applied in the order in which they are listed in the command line arguments.
Crop
-crop width height
Grayscale
-gs
Negative
-neg
Sharpening
-sharp
EdgeDetection
-edge threshold
GaussianBlur
-blur sigma [kernel_radius]
Pixelation
-pixelate pixel_size
Embossing
-emboss
Noise
-noise strength
Walhorisation
-walhorisation
Twirl
-twirl X Y