Git Product home page Git Product logo

morphological-operators-cupy's Introduction

Implementation of the van Herk/Gil-Werman algorithm for fast morphological dilation/erosion exploiting shared memory for maximum GPU parallelization.

For even sized array i've followed the same technique used by the scipy algorithm, in particular the window for the erosion is such the center elemnent is in position (p / 2) + 1.

The repository contains a Python wrapper around the CUDA code based on cupy RawKernels.

The current implementation is generally 5-10x time faster than the one contained in Scipy when using an Nvidia GTX 1060 against an overclocked Intel i5-6600k.

In particular this implementation is 50x faster when working with the top-hat filter, even more when the structuring element is very large. Don't know why but the Scipy implementation of the white and black top hat is terribly slow.

As i'm new to CUDA develop i'm also quite sure this can go even faster!

This repo is heavily inspired by "Parallel van Herk/Gil-Werman image morphology on GPUs using CUDA" Luke Domanski, Pascal Vallotton, Dadong Wang (2016) and of course "A fast algorithm for local minimum and maximum filters on rectangular and octagonal kernels" Van Herk, M. (1992).

morphological-operators-cupy's People

Contributors

lorenzomammana avatar

Stargazers

 avatar

Watchers

 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.