GithubHelp home page GithubHelp logo

tianhaoyue / harris-corner-detector Goto Github PK

View Code? Open in Web Editor NEW

This project forked from daksh-404/harris-corner-detector

0.0 1.0 0.0 332 KB

This is the C++(openCV) code for a Harris Corner Detector. The code hasn't used cornerHarris() function, instead it has been an attempt to dive into the depth of this function and making it from the one of the most basic filters and operators of openCV. The threshhold and the value of k have been taken according to general standards.

C++ 100.00%

harris-corner-detector's Introduction

Harris-corner-detector

This is the C++(openCV) code for a Harris Corner Detector. The code hasn't used cornerHarris() function, instead it has been an attempt to dive into the depth of this function and making it from the one of the most basic filters and operators of openCV. The threshhold and the value of k have been taken according to general standards.

Original image: The marked corner image:

The color marked image:

The first image shows the originalimage whereas the second image shows the image after applying Harris Corner Detection Algorithm, All the detected corners are displayed as black dots on the corrosponding image.

The Self Made harris Corner Detection Function

The function follows the Harris Corner Detection Algorithm which can be summed up in through these steps:

  1. Find the gradient/differentials of the given grey scale image for each pixel using the Sobel's operator.
  2. Calculate Ix,Iy and Ixy using the above differentials through pow() and multiply() functions(The Ix and Iy will be squared).
  3. Apply a Gaussinan blur on all the Ix,Iy and Ixy matrices found in the previous steps(Ixg,Iyg and Ixyg).
  4. Mulitiply Ixg^2 with Iyg^2, similarly find Ixyg^2. Find trace by adding Ixg^2 and Iyg^2.
  5. Find R=dst=Det-k*(trace)^2.
  6. Set a threshhold and check while iterating over each and every pixel.

harris-corner-detector's People

Contributors

daksh-404 avatar

Watchers

James Cloos 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.