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



浙公网安备 33010602011771号