Skip to content

pipertownley/edge_filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Edge Filter

A Laplacian edge filter written with Keras/TensorFlow.

I wrote this as an exploration of Convolution filtering, while learning about computer vision from first-principles. As such, convolution kernels were manually hard-coded to effect the desired function.

In this case, I convert the video input to greyscale before sending into the convolution stack, then the first convolution layer applies a Guassian blur to the image. We then apply a Laplacian convolution and feed the result into a binary mask. The output is a black and white image of the detected edges in the source image. This is looped for each frame in the video stream, and is very performant at ~10ms per frame.

Installation

Install dependencies with Conda

conda env create -f environment.yml
conda activate tensorflow

Run the script

./edge_filter.py

Or use the included Jupyter Notebook

jupyter notebook edge_filter.ipynb

Example

old fancy car processed
parrot processed
green lizard processed

About

A Laplacian edge filter written in Keras/TensorFlow

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published