Repo that performs sobel filter on grayscale pgm images for edge detection purposes. Both binary (P2) and text (P5) formats are supported.
You can find sample pgm images on the links below:
- https://people.sc.fsu.edu/~jburkardt/data/pgma/pgma.html
- https://people.sc.fsu.edu/~jburkardt/data/pgmb/pgmb.html
First, say make
to compile.
Pass in the input and desired output filenames with the flags x
and o
respectively.
If you want to see X and Y gradients of the image, simply specify --export-gradients
option afterwards.
./main -x [input file] -o [output file] --export-gradients (optional)
X | Y |
---|---|