MingaudasVagonis / edge-detection-coloring

Detecting and coloring edges according to their direction using NxN kernel convolutions implementation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

edge-detection-coloring

Detecting and coloring edges according to their direction using NxN kernel convolutions' implementation.

Contents

Examples
Kernel convolutions' implementation
Usage

Examples

Input Long Flags Short Flags Output


--colored
--threshold 9 22
-c
-t 9 22
--colored
--threshold 9 22
--stroke 1
-c
-t 9 22
-s 1
--threshold 9 22 -t 9 22

Kernel convolutions' implementation

Instead of padding the image with black pixels i'm cropping the kernel to fit available pixels.

For example:

Given a kernel of 5x5 dimensions, on the first pixel (0, 0) theres no pixels before it to accommodate the kernel thus it is cropped for only available pixels and applied for the (0,0) pixel.

+ ->

Usage

Launching

git clone https://github.com/MingaudasVagonis/edge-detection-coloring.git
cd edge-detection-coloring
python3 main.py [filename] [flags]

Flags

Long Flags Short Flags Description
--threshold -t One or two numbers representing lower and upper thresholds.
--colored -c Set this in order to apply color to the edges according to their direction.
--stroke -s A number representing the width of the output edge.

About

Detecting and coloring edges according to their direction using NxN kernel convolutions implementation.


Languages

Language:Python 100.0%