CVV : the API
Introduction
Namespace for all functions is cvv, i.e. cvv::showImage().
Compilation:
- For development, i.e. for cvv GUI to show up, compile your code using cvv with g++ -DCVVISUAL_DEBUGMODE.
- For release, i.e. cvv calls doing nothing, compile your code without above flag.
See cvv tutorial for a commented example application using cvv.
API Functions
showImage
Add a single image to debug GUI (similar to imshow).
-
C++: void showImage(InputArray img, const CallMetaData& metaData, const string& description, const string& view)
Parameters: |
- img – Image to show in debug GUI.
- metaData – Properly initialized CallMetaData struct, i.e. information about file, line and function name for GUI. Use CVVISUAL_LOCATION macro.
- description – Human readable description to provide context to image.
- view – Preselect view that will be used to visualize this image in GUI. Other views can still be selected in GUI later on.
|
debugFilter
Add two images to debug GUI for comparison. Usually the input and output of some filter operation, whose result should be inspected.
-
C++: void debugFilter(InputArray original, InputArray result, const CallMetaData& metaData, const string& description, const string& view)
Parameters: |
- original – First image for comparison, e.g. filter input.
- result – Second image for comparison, e.g. filter output.
- metaData – See showImage()
- description – See showImage()
- view – See showImage()
|
debugDMatch
Add a filled in DMatch to debug GUI. The matches can are visualized for interactive inspection in different GUI views (one similar to an interactive drawMatches).
-
C++: void debugDMatch(InputArray img1, std::vector<cv::KeyPoint> keypoints1, InputArray img2, std::vector<cv::KeyPoint> keypoints2, std::vector<cv::DMatch> matches, const CallMetaData& metaData, const string& description, const string& view, bool useTrainDescriptor)
Parameters: |
- img1 – First image used in DMatch.
- keypoints1 – Keypoints of first image.
- img2 – Second image used in DMatch.
- keypoints2 – Keypoints of second image.
- metaData – See showImage()
- description – See showImage()
- view – See showImage()
- useTrainDescriptor – Use DMatch‘s train descriptor index instead of query descriptor index.
|
finalShow
This function must be called once after all cvv calls if any.
As an alternative create an instance of FinalShowCaller, which calls finalShow() in its destructor (RAII-style).
-
C++: void finalShow()
setDebugFlag
Enable or disable cvv for current translation unit and thread (disabled this way has higher - but still low - overhead compared to using the compile flags).
-
C++: void setDebugFlag(bool active)
-
Help and Feedback
You did not find what you were looking for?
- Ask a question on the Q&A forum.
- If you think something is missing or wrong in the documentation,
please file a bug report.