I completely recoded the Image Manipulation program. It is now better structured and easier to use. Additionally I implemented the Canny Edge Detector Algorithm and some more filters. 8-bit BMP’s are still not supported, so that would be the next step.
To test the edge detector, I used the image from the Wikipedia article on the topic, as the desired result was known for that image.
Complete C++ code can be downloaded here (executable included).
Executing the program without parameters displays the help.
To perform edge detection on an image, use the following parameter sequence:
image <input.bmp> <output.bmp> -g -f 0.8 -e -n 80 -w 80 50
This command first converts the image to greyscale (-g), then applys gaussian blur with a standard deviation of 0.8 (-f 0.8). After that, Sobel filters for X and Y direction are convoluted with the image, which gives an edge image. Those edges are now thinned by Non-Maximum-Suppression (-n 80), which only leaves one-pixel wide edges, which are above the given threshold. Finally the edge tracer (-w 80 50) deletes pixels not belonging to an edge, by appling hysteresis thresholding.