MCPcopy Index your code
hub / github.com/PyImageSearch/imutils / is_cv2

Function is_cv2

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

Source from the content-addressed store, hash-verified

175 return cnts
176
177def is_cv2(or_better=False):
178 # grab the OpenCV major version number
179 major = get_opencv_major_version()
180
181 # check to see if we are using *at least* OpenCV 2
182 if or_better:
183 return major >= 2
184
185 # otherwise we want to check for *strictly* OpenCV 2
186 return major == 2
187
188def is_cv3(or_better=False):
189 # grab the OpenCV major version number

Callers 2

__init__Method · 0.85
factories.pyFile · 0.85

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…