zoukankan      html  css  js  c++  java
  • Modern C++ Course [Lecture 9] {Templates, Iterators, Exceptions, Program input parameters, OpenCV}

     GP is a kind of programming that will generate code for you at compile time.

    The core is to seperate algorithms from the data structure, and we do some abstraction over a data structure,

    and then work with that abstraction instead of the actually type.

     

    template errors are insanely big.

    Vector is a template class.

     

     

     

    http://en.cppreference.com/w/cpp/language/class_template

    http://www.drdobbs.com/moving-templates-out-of-header-files/184403420

    method 1:(Declare and define in header files) if declare and define both in header file, then we dont need to link files. (header on the library)

    method 2:(Declare in NAME.h file) hpp is just a habit of naming such a file, and #include just means add those content of hpp file into header file

    method3 : /

     

    func .find in map object

     line 15 is an efficient way to check if 3 in map

     

      

    line 3-8: the first template

    line 10-11: the 2nd template

    question: what's the meaning of "::" in line 15? 

     

    free BSD license:

    free for commercial or non-commercial

     

     exr is an open format to store data, and opencv supports it

    My implementation:

     

     Gotcha!

     

     

     

    line3 type: unsigned char 3 channels

    and  line 11 is: float 1 channel

     

    now DNN is a new and better descriptor but it's slower.

    build a KD tree and query for neighbor, much faster than brute force search 

     

     

    SIFT is non free, and is in libopencv-nonfree

     

  • 相关阅读:
    过滤器和拦截器的区别
    sql注入
    JavaScript学习
    Linux简单学习
    HTML DOM学习
    Java集合
    java 多线程学习
    常用的OO设计原则
    JAVA设计模式一策略模式(Strategy Pattern)
    201521123071《Java程序设计》第1周学习总结
  • 原文地址:https://www.cnblogs.com/ecoflex/p/10213975.html
Copyright © 2011-2022 走看看