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

Function get_opencv_major_version

imutils/convenience.py:210–216  ·  view source on GitHub ↗
(lib=None)

Source from the content-addressed store, hash-verified

208 return major == 4
209
210def get_opencv_major_version(lib=None):
211 # if the supplied library is None, import OpenCV
212 if lib is None:
213 import cv2 as lib
214
215 # return the major version number
216 return int(lib.__version__.split(".")[0])
217
218def check_opencv_version(major, lib=None):
219 # this function may be removed in a future release as we now

Callers 3

is_cv2Function · 0.85
is_cv3Function · 0.85
is_cv4Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…