本文整理汇总了Python中cv2.getBuildInformation方法的典型用法代码示例。如果您正苦于以下问题:Python cv2.getBuildInformation方法的具体用法?Python cv2.getBuildInformation怎么用?Python cv2.getBuildInformation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cv2
的用法示例。
在下文中一共展示了cv2.getBuildInformation方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: opencv_version
# 需要导入模块: import cv2 [as 别名]
# 或者: from cv2 import getBuildInformation [as 别名]
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)
示例2: _check_opencv_config
# 需要导入模块: import cv2 [as 别名]
# 或者: from cv2 import getBuildInformation [as 别名]
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)
示例3: extraOpenCVModulesPresent
# 需要导入模块: import cv2 [as 别名]
# 或者: from cv2 import getBuildInformation [as 别名]
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
#####################################################################