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

     

  • 相关阅读:
    JSP基础
    线程控制
    多线程简述
    Servlet生命周期
    同步代码块和同步方法有什么区别?
    java.sql.Date和java.util.Date的区别
    Java自学指南五、编码工具
    基本类型和包装类的区别?
    什么是包装类?为什么要有包装类?基本类型与包装类如何转换?
    什么是Java的垃圾回收机制?
  • 原文地址:https://www.cnblogs.com/ecoflex/p/10213975.html
Copyright © 2011-2022 走看看