Coder Social home page Coder Social logo

cornerdetection's Introduction

CUDA-Harris-Corner-Detector

This project is a CUDA-acclerated Harris Corner Detector based on Corner-Detector. We implemented the project using C/C++ with i7-7700 and RTX 2080Ti.

Usage

Folder and Data

Here is the directory tree structure for the project.


├── input
│   └── image.ppm           // input images(should be ppm format)
├── Makefile
├── output
│   └── ...                 // output images
├── README.md
└── source
    ├── CornerDetector.cu   // main part of the project
    ├── GaussFilter.cuh     // CUDA header file of gaussian filter 
    ├── Gauss.h             // header file of gaussian filter
    ├── Matrix.h            // header file of class Matrix
    ├── PPM.h               // header file to deal with portable pixmap format (PPM) image
    ├── SobelFilter.cuh     // CUDA header file of sobel filter 
    ├── Sobel.h             // header file of sobel filter
    ├── utils.h             // other utilities
    └── VectorOperation.cuh // CUDA header file of vector operation

Prepare Images

Put your images into the ./input folder. Please note that the image must be .ppm format. With linux you can convert the image format using

convert image.jpg image.ppm

Start

here is an example to run the code.

Compilation

you can just use make command, or

nvcc CornerDetector.cu -o CornerDetector

Execution

There are four parameter to assign.

./CornerDetector <imagePath> <gaussMask=size> <tpb=threadsPerBlock> <sigma=doubleValue>

example

./CornerDetector ./input/IMG_0125.ppm

Results

To compare the perfomance between CPU and GPU, we perform our Harris Corner Detector on a image of size 3648x5472, and the comparison results shown in Table 1. We could see that the GPU version is much faster the CPU version.

CPU GPU-Shared-Memory GPU-Dynamic-Shared-Memory
Running Time 17.378s 0.246s 0.247s
Difference - 0 0

The output image shown below. The red spot are Harris Corner Response.


Result from IMG_0125.ppm

Result from IMG_4486.ppm

Reference

cornerdetection's People

Contributors

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