Giter VIP home page Giter VIP logo

fhog-1's Introduction

FHOG

Felzenszwalb HOG(FHOG) Feature Extractor for C++.

FHOG is widely used in object tracking and object detection. @joaofaro offers C++ implementation along with his KCF tracker. This implementation uses OpenCV 1 data structure. Besides, feature map memory is not automatically released.

This repository rewrite the FHOG code in C++ with OpenCV3.

Requirement

  1. OpenCV 3+(OpenCV2 should work, but not tested)

Usage

#include "fhog.h"

...
    FHOG fhogDescripter;
    // This can be called before your caculation.
    // If this function is called before actual calculation,
    // many internel Mats will be pre-allocated.
    // When you are calculating fixed size FHOG, this function 
    // is useful. If you don't want to call this function,
    // it is still OK because compute function will still call
    // it automatically.
    fhogDescripter.static_Init(img.size(), 4);
    cv::Mat feat;
    // Compute the FHOG feature
    fhogDescripter.compute(img, feat, 4, 0.2);
...

If you only need to use fhog, copy include/fhog.h and src/fhog.cpp to your workspace.

WARNING: include/fhog1.hpp and src/fhog2.cpp are original FHOG used to test performance.

Performance

According to our test, our implementation is about 26% faster than original work(fixed size);

Time Consumptioin:

Original New
4.96s 3.66s

* Test Condition: 640x512 Gray Image, 500 times

fhog-1's People

Contributors

todayl avatar

Watchers

 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.