(or_better=False)
| 197 | return major == 3 |
| 198 | |
| 199 | def 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 | |
| 210 | def get_opencv_major_version(lib=None): |
| 211 | # if the supplied library is None, import OpenCV |
nothing calls this directly
no test coverage detected
searching dependent graphs…