GithubHelp home page GithubHelp logo

futhark-canny-edge-detection's Introduction

Canny Edge Detection in Futhark

This repository contains some very basic image processing methods, in particular an implementation of Canny Edge Detection, implemented in Futhark.

There is also an example illustrating how these simple methods can be used to implement a lane detection algorithm for use in autonomous operation or something similar.

Running

You will need a couple of things to run the code:

  • Futhark.
  • openCL
  • pyopencl (i suppose the easiest is apt-get install python-pyopencl
  • sklearn / scikit-learn
  • openCV
  • Other things i most certainly forgot to mention here.
  • some video, preferably a dark road with very white lines. You need to change the line in lane_detection.py that specifies which input file you have (line 56).

To compile and execute, you need to run these commands.

futhark-pyopencl --library util.fut
futhark-pyopencl --library imageproc.fut
python lane_detection.py

Hopefully, you will get a result like shown below. If not, look into tweaking the argument for canny. image broken

Performance

My potato-laptop has:

  • Intel Core i3-6100U Processor (3MB cache, 2.30GHz)
  • Intel HD Graphics 520 (it's an integrated card)
  • 4GB DDR4-2133 SODIMM RAM

The performance of the Canny Edge Detection algorithm is (evaluated with futhark-bench):

  • HD resolution images 1920x1080:
    • 272 916 microseconds (running on CPU)
    • 99 843 microseconds (running on GPU) (2.73x faster)
  • 4K HD resolution images 3840x2160:
    • 1 094 854 microseconds (running on CPU)
    • 387 495 microseconds (running on GPU) (2.82x faster)

futhark-canny-edge-detection's People

Contributors

rewbert avatar

Stargazers

Troels Henriksen avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.