diff --git a/readme.md b/readme.md index 179d39736dba1929c935fd7758b39ebee1c2b72c..9dea5061a43ff7a73d5fb2a5c2a49a491b19a90f 100644 --- a/readme.md +++ b/readme.md @@ -6,6 +6,47 @@ Various examinations of the concept of Convolution. Mostly as a means to explore programming with the GPU. +### Part 0 +This part mostly acts as a test for generally using C++ and CUDA with image input. + +Before this project, I had never written in C++, used CUDA, or used images as input data. + +For each input image, it will create a corresponding output image that: +* Has every other pixel alternate between black and white, ignoring original input (but still using original image size). +* Has a checkerboard type pattern of black/white squares, igoring original input (but still using original image size). +* Has red color saturation increased from original image. +* Has green color saturation increased from original image. +* Has blue color saturation increased from original image. + +### Part 1 +This part implements Gaussian Blur through convolution. + +Effectively creates a blurred version of the original input image. + +Blur strength can be adjusted by changing the mask size on lines 490/491 in the `image.cu` file. +* Larger masks mean stronger blur, but longer compute times. +* Smaller masks mean weaker blur, but faster compute times. + +### Part 2 +This part implements edge detection using the "Laplacian of Gaussian". + +Effectively, creates a grey/black image, with light-grey/white indicating where image lines are. + +Detection strength can be adjusted by changing the mask size on lines 490/491 in the `image.cu` file. +* Recommend either 7x7 or 9x9 mask size. +* Anything smaller tends to fail to detect lines well. +* Anything larger tends to overfit and pick up noise as "lines". + +### Running the Project +Using terminal, open the desired part (part_0 / part_1 / part_2). + +Execute with + + clear && make run <input_path> + +Where \<input_path\> is the path to an image file or a directory of image files. + +Note that only portable bitmap files are accepted as input. ## References