Git Product home page Git Product logo

begputhinning's Introduction

This code provides implementation of the real-time thinning / centerline extraction techniques
proposed in "Real-time thinning algorithms for 2D and 3D images using GPU processors" (Wagner, 
2019, Journal of Real-Time Image Processing). The library take binarized 2D images or 3D volumes
and generates a list of curvilinear segments representing the centerlines. The code is free to 
use for research purposes and non-commercial use. If you do so please cite:

Wagner, M.G. J Real-Time Image Proc (2019). https://doi.org/10.1007/s11554-019-00886-7

The paper can be found at https://link.springer.com/article/10.1007/s11554-019-00886-7.

If you have any issues using the code please contact me at [email protected].



INSTALLATION
=============

The code was written for Windows and tested on Matlab 2018b with CUDA toolkit version 9.1. It requires
a CUDA capable GPU with compute capability 3.x or higher. Other versions of Matlab and CUDA should work as well. 
Currently mexcuda does not support the new interleaved complex API, therefore, the separate complex API is used 
instead by default. If you have a newer version of MATLAB where the separate complex API is not supported anymore, 
please uncomment "#define USE_SEPARATE_COMPLEX_API" in both Matlab2DThinning.cpp and Matlab3DThinning.cpp.

1) Install CUDA toolkit: It is important to have the CUDA version corresponding to your Matlab version 
   installed. A list of the corresponding CUDA toolkit versions can be found here:
   https://www.mathworks.com/help/parallel-computing/gpu-support-by-release.html;jsessionid=7e482ca21ebcd63c2e1b53b0aa5a
   
2) (Optional) Set environment variable MW_NVCC_PATH to the CUDA path: This is required for mexcuda to work correctly.
   The provided Compile function will attempt to find the path automatically, however if you are using non-standard
   install paths for CUDA it might not be able to find it. You can set the variable from MATLAB using the following 
   command (Replace the path with your own installation path):
   setenv('MW_NVCC_PATH', 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\bin');

3) Run Matlab function "Compile" in the main directory of the provided code. This will generate the mex files: 
   Matlab2DThinning.mexw64 and Matlab3DThinning.mexw64.
   
4) (Optional) Run the Examples code provided in Example2D.m and Example3D.m


COMPILE AS LIBRARY FOR C/C++
============================

This code can also be compiled as C/C++ library (.lib or .dll):

1) Create a new Project in Visual Studio and select the CUDA X.X Runtime project type.
2) Add all .h, .cpp, .cu, and .cuh files in the 2D or 3D folder to the project.
3) Go to project settings and set "Configuration Type" to "Dynamic Library (*.dll)" or "Static Library (*.lib)"
4) Build project

In your C/C++ project include header "CenterlineExtraction.h" and add lib file to linker.

begputhinning's People

Contributors

mwagner9 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.