本文整理汇总了Python中SimpleCV.Image.getNumpyCv2方法的典型用法代码示例。如果您正苦于以下问题:Python Image.getNumpyCv2方法的具体用法?Python Image.getNumpyCv2怎么用?Python Image.getNumpyCv2使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimpleCV.Image
的用法示例。
在下文中一共展示了Image.getNumpyCv2方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Image
# 需要导入模块: from SimpleCV import Image [as 别名]
# 或者: from SimpleCV.Image import getNumpyCv2 [as 别名]
cv2_img = cv2.imread('edi uveitis final6.png')
scv_img = Image(cv2_img, cv2image=True)
scv_img = scv_img.rotate90()
def threshold(value):
global scv_img
# The t1 parameter is roughly the "strength" of the edge required, and the
# value between t1 and t2 is used for edge linking.
output = scv_img.edges(t1=value)
#output.show()
cv2.imshow(windowTitle, output.getNumpyCv2())
if __name__ == "__main__":
cv2.namedWindow(windowTitle, cv2.WINDOW_NORMAL)
cv2.createTrackbar('Threshold', windowTitle, 0, 1000, threshold)
#output.show()
#imgs.addDrawingLayer(output.dl())
#cv2_image = scv_img.getNumpyCv2()
#ocv_gray = cv2.cvtColor(ocv_image, cv2.cv.CV_BGR2GRAY)
cv2.imshow(windowTitle, scv_img.getNumpyCv2())
while True:
# key = cv2.waitKey(0)
# 0xFF para 64 bits
key = cv2.waitKey(0) & 0xFF
# 27 = ESC 113 = q
if key == 27 or key == 113:
cv2.destroyWindow(windowTitle)
break