Problem description :
Watching OpenCV Document description , In some cases, I don't understand it very well , Because some of the descriptions in the official documents are not easy to understand , Especially when there is no corresponding knowledge background . So that sentence :“Stop
BiBi, show me the
code.” Here comes the principle . I am not OpenCV Of Contributor, So the framework of the original project is not very clear . However, you need to locate the function declaration and implementation location . Here are the common methods used in this period of time . It's not a formal method , I'm just summarizing what I've found .
<> method 1: Guess by feeling
For example, we use functions :calib**() And the included header file , We know that nine out of ten of this function is calib Corresponding module; Or find the corresponding header file .
<> method 2: Look at the document
Sometimes it contains a lot of header files , Or there is nesting . It may not be so easy to find it at this time . for instance :
cv::undistort() It looks like it should be in calibration The part of , It turns out that only a few related ones were found . however :
According to the path of the document, it is found that the imgproc Of module, So it opened VS2017, open OpenCV Of sln Sure enough, it was found in the imgproc, Go to definition , Look at the source code and analyze it
cv::initUndistortRectifyMap (with unity R ) And remap() The relationship between , This is much clearer than the documentation .
Technology