MCPcopy Create free account
hub / github.com/PyImageSearch/imutils / is_cv4

Function is_cv4

imutils/convenience.py:199–208  ·  view source on GitHub ↗
(or_better=False)

Source from the content-addressed store, hash-verified

197 return major == 3
198
199def is_cv4(or_better=False):
200 # grab the OpenCV major version number
201 major = get_opencv_major_version()
202
203 # check to see if we are using *at least* OpenCV 4
204 if or_better:
205 return major >= 4
206
207 # otherwise we want to check for *strictly* OpenCV 4
208 return major == 4
209
210def get_opencv_major_version(lib=None):
211 # if the supplied library is None, import OpenCV

Callers

nothing calls this directly

Calls 1

get_opencv_major_versionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…