Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I find opencv functions source code?

Tags:

opencv

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 that specific machine vision algorithm is implemented.

like image 620
Moeen Eragh Avatar asked Jul 30 '13 18:07

Moeen Eragh


People also ask

Is OpenCV open-source?

OpenCV is open source and released under the Apache 2 License. It is free for commercial use.

Is OpenCV and cv2 same?

cv2 (old interface in old OpenCV versions was named as cv ) is the name that OpenCV developers chose when they created the binding generators. This is kept as the import name to be consistent with different kind of tutorials around the internet.

Which library contains cv2?

Capturing video using OpenCV OpenCV has a function to read video, which is cv2.


1 Answers

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.

like image 95
Bull Avatar answered Sep 16 '22 14:09

Bull