Code Monkey home page Code Monkey logo

sfnd_2d_feature_tracking's Introduction

SFND 2D Feature Tracking

The idea of the camera course is to build a collision detection system - that's the overall goal for the Final Project. As a preparation for this, you will now build the feature tracking part and test various detector / descriptor combinations to see which ones perform best. This mid-term project consists of four parts:

  • First, you will focus on loading images, setting up data structures and putting everything into a ring buffer to optimize memory load.
  • Then, you will integrate several keypoint detectors such as HARRIS, FAST, BRISK and SIFT and compare them with regard to number of keypoints and speed.
  • In the next part, you will then focus on descriptor extraction and matching using brute force and also the FLANN approach we discussed in the previous lesson.
  • In the last part, once the code framework is complete, you will test the various algorithms in different combinations and compare them with regard to some performance measures.

See the classroom instruction and code comments for more details on each of these parts. Once you are finished with this project, the keypoint matching part will be set up and you can proceed to the next lesson, where the focus is on integrating Lidar points and on object detection using deep-learning.

Dependencies for Running Locally

  1. cmake >= 2.8
  1. make >= 4.1 (Linux, Mac), 3.81 (Windows)
  1. OpenCV >= 4.1
  • All OSes: refer to the official instructions
  • This must be compiled from source using the -D OPENCV_ENABLE_NONFREE=ON cmake flag for testing the SIFT and SURF detectors. If using homebrew: $> brew install --build-from-source opencv will install required dependencies and compile opencv with the opencv_contrib module by default (no need to set -DOPENCV_ENABLE_NONFREE=ON manually).
  • The OpenCV 4.1.0 source code can be found here
  1. gcc/g++ >= 5.4
  • Linux: gcc / g++ is installed by default on most Linux distros
  • Mac: same deal as make - install Xcode command line tools
  • Windows: recommend using either MinGW-w64 or Microsoft's VCPKG, a C++ package manager. VCPKG maintains its own binary distributions of OpenCV and many other packages. To see what packages are available, type vcpkg search at the command prompt. For example, once you've VCPKG installed, you can install OpenCV 4.1 with the command:
c:\vcpkg> vcpkg install opencv4[nonfree,contrib]:x64-windows

Then, add C:\vcpkg\installed\x64-windows\bin and C:\vcpkg\installed\x64-windows\debug\bin to your user's PATH variable. Also, set the CMake Toolchain File to c:\vcpkg\scripts\buildsystems\vcpkg.cmake.

Basic Build Instructions

  1. Clone this repo.
  2. Make a build directory in the top level directory: mkdir build && cd build
  3. Compile: cmake .. && make
  4. Run it: ./2D_feature_tracking.

sfnd_2d_feature_tracking's People

Contributors

nz-is avatar roman-smirnov avatar sudkul avatar swwelch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sfnd_2d_feature_tracking's Issues

fatal error: opencv2/xfeatures2d.hpp: No such file or directory

I installed opencv4.1.0 but when I ran the project, I couldn't find xfeatures2d.hpp.

the error is

matching2D.hpp:16:35: fatal error: opencv2/xfeatures2d.hpp: No such file or directory
 #include <opencv2/xfeatures2d.hpp>
                                   ^
compilation terminated.
CMakeFiles/2D_feature_tracking.dir/build.make:62: recipe for target 'CMakeFiles/2D_feature_tracking.dir/src/matching2D_Student.cpp.o' failed
make[2]: *** [CMakeFiles/2D_feature_tracking.dir/src/matching2D_Student.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/2D_feature_tracking.dir/all' failed
make[1]: *** [CMakeFiles/2D_feature_tracking.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

What should I do?

Usage of descriptorType variable.

In MidTermProject_Camera_Student.cpp, descriptorType variable is used twice with different meanings... This is bringing some confusion to students.

Line 128: string descriptorType = "BRISK";
Line 144: string descriptorType = "DES_BINARY"; // DES_BINARY, DES_HOG

Maybe change to string descNormType = "DES_BINARY"; // DES_BINARY, DES_HOG ?

Build error

So I was able to build opencv4.1 (by downloading opencv4.1 and OpenCV-contrib) on ubuntu 16.04 and everything went fine. I also tried searching for the features2d package and was able to locate them under usr/local/include. Though in my case in the home directory I have created a separate folder in which I cloned the OpenCV git repo. Now when I try to build the project as mentioned in the following link(https://github.com/udacity/SFND_... I get the following error Fatal error: xfeatures2d.hpp no such file or directory What is strange is that when I go to the home folder in which OpenCV and OpenCV contribs are located I can find these files. Similarly, I can locate the library features2d in the usr/local/lib folder also. I tried to edit the cmakelist.txt file in the project by adding set("OPECV_DIR",/usr/local) but that didn't work. Any suggestions as to what can I do

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.