[PYTHON] Search for OpenCV function names

When using OpenCV, the documentation is sometimes not updated or incorrect. In such a case, I think it is most certain to rely on the actual product. For example, if you remember the function name and want to do a partial search, it looks like this.

import cv2
items = dir(cv2)
for item in items:
    if 'Back' in item:
        print item
PCABackProject
SVBackSubst
calcBackProject
createBackgroundSubtractorKNN
createBackgroundSubtractorMOG2

In my environment, I found that there are two types of Background Subtractor.

Reference: How to find functions by name in OpenCV

[Addition] Use list comprehension in one line.

print [x for x in dir(cv2) if "Back" in x]

Recommended Posts

Search for OpenCV function names
Search for homeomorphic idioms with opencv
OpenCV for Python beginners
Search list for duplicate elements
[Python] Etymology of python function names
Search for strings in Python
OpenCV3 installation for Python3 @macOS
Search for strings in files
Python #function 2 for super beginners
Search numpy.array for consecutive True
[Excel] Search for duplicate values (characters)
Binary search summary for competition professionals
Search for profitable brands using COTOHA
Python #len function for super beginners
Efficiently search for optimal parameters (Optuna)
Use cases for nested function definitions
Vectorize sentences and search for similar sentences
[OpenCV; Python] Summary of findcontours function