本文整理匯總了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
#####################################################################