Python cv2.getBuildInformation() Examples

The following are 3 code examples of cv2.getBuildInformation(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module cv2 , or try the search function .
Example #1
Source File: assert_modules.py    From ibeis with Apache License 2.0 5 votes vote down vote up
def opencv_version():
    import cv2
    #print(cv2.getBuildInformation())
    if LIB_DEP:
        libdep = None
    else:
        libdep = ut.get_dynlib_dependencies(cv2.__file__)
    return module_stdinfo_dict(cv2, libdep=libdep) 
Example #2
Source File: opencv_file.py    From IkaLog with Apache License 2.0 5 votes vote down vote up
def _check_opencv_config(self):
        build_info = cv2.getBuildInformation()
        ffmpeg_line = re.search(r'FFMPEG\:\s+(.*)', build_info)

        is_osx = IkaUtils.isOSX()
        is_ffmpeg_enabled = (ffmpeg_line and ffmpeg_line.group(1) == 'YES')

        if (is_osx and not is_ffmpeg_enabled):
            IkaUtils.dprint('%s: OpenCV misconfiguration detected.\n'
                '  - IkaLog may experience serious performance degradation.\n'
                '  - IkaLog may not able to read several video formats.\n'
                '  Please review your OpenCV Configuration.\n'
                '  %s' % (self, ffmpeg_line.group(0))
            )
            time.sleep(5) 
Example #3
Source File: surf_detection.py    From python-examples-cv with GNU Lesser General Public License v3.0 5 votes vote down vote up
def extraOpenCVModulesPresent():

    # we only need to check this once and remember the result
    # so we can do this via a stored function attribute (static variable)
    # which is preserved across calls

    if not hasattr(extraOpenCVModulesPresent, "already_checked"):
        (is_built, not_built) = cv2.getBuildInformation().split("Disabled:")
        extraOpenCVModulesPresent.already_checked = ('xfeatures2d' in is_built)

    return extraOpenCVModulesPresent.already_checked

#####################################################################