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

     

  • 相关阅读:
    .NET 操作XML
    C#常用操作类库五(电脑操作类)
    C#常用操作类库四(File操作类)
    C#常用操作类库一(验证类)
    RabbitMQ 学习
    redis 常用命令
    windows10配置redis一主二从三哨兵
    Oracle递归查询(查询当前记录所有父级或子级)
    echarts 中 柱图 、折线图、柱图层叠
    简单的前台登录
  • 原文地址:https://www.cnblogs.com/ecoflex/p/10213975.html
Copyright © 2011-2022 走看看