(lib=None)
| 208 | return major == 4 |
| 209 | |
| 210 | def 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 | |
| 218 | def check_opencv_version(major, lib=None): |
| 219 | # this function may be removed in a future release as we now |