How can I find opencv functions source code?

前端 未结 4 1332
面向向阳花
面向向阳花 2021-01-04 03:28

I am new to opencv and I am using opencv for windows. How can I see the source code for a specific function of an opencv library ? I just one want to get an idea of how tha

相关标签:
4条回答
  • 2021-01-04 04:01

    I found the answer by Drew Noakes to be the most helpful, especially given the fact that repository structures keep changing over time.

    To search in the code or in other places inside a repository using a keyword, the instructions here can be followed.

    What would be even easier for first-timers however, would be to simply search for a key word in the github search bar. Then the appropriate advanced search option would generate the tags described in the the earlier linked tutorial.

    0 讨论(0)
  • 2021-01-04 04:07

    You can get the OpenCV source code from https://github.com/opencv. An easy way to find the header for a function is to open an explorer window in OPENCV_HOME\build\include (where is the location where you chose to install OpenCV) and use the search box to find the header file that contains your function - this will help you know what module it is in. Then you can search in OPENCV_HOME\modules\MODULE_NAME\src to find the source of the the function. This is even easier if you install a search tool like grepWin.

    Looking at the source is almost essential for finding out why those pesky OpenCV exceptions are thrown. It also means that you can answer most things about OpenCV yourself without having to ask here.

    0 讨论(0)
  • 2021-01-04 04:10

    Here is a direct link to an excellent source code search, courtesy of Github. This is a very straightforward way to find the implementation and internal usages of a function or type.

    0 讨论(0)
  • 2021-01-04 04:13

    All the source is now on github:

    https://github.com/opencv/opencv and you can use it's search functionalities as well.

    0 讨论(0)
提交回复
热议问题