本文整理汇总了Python中SimpleCV.Image.adaptiveScale方法的典型用法代码示例。如果您正苦于以下问题:Python Image.adaptiveScale方法的具体用法?Python Image.adaptiveScale怎么用?Python Image.adaptiveScale使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimpleCV.Image
的用法示例。
在下文中一共展示了Image.adaptiveScale方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Display
# 需要导入模块: from SimpleCV import Image [as 别名]
# 或者: from SimpleCV.Image import adaptiveScale [as 别名]
# http://www.youtube.com/watch?v=cAL6u6Q0Xuc
from SimpleCV import Image, Display
import time
#webcam-URLs
marktplatz = 'http://www.tuebingen.de/camera/webcam...'
marktgasse = 'http://leuchtengalerie.com/webcam/leu...'
neckarbruecke1 = 'http://www.tagblatt.de/cms_media/webc...'
neckarbruecke2 = 'http://tuebingen-info.de/fileadmin/we...'
display = Display((1240, 960))
counter = 0
while not display.isNotDone():
img1 = Image(marktplatz)
img1 = img1.adaptiveScale((640, 480))
img2 = Image(marktgasse)
img2 = img2.adaptiveScale((640, 480))
img3 = Image(neckarbruecke1)
img3 = img3.adaptiveScale((640, 480))
img4 = Image(neckarbruecke2)
img4 = img4.adaptiveScale((640, 480))
top = img1.sideBySide(img2)
bottom = img3.sideBySide(img4)
combined = top.sideBySide(bottom, side="bottom")
combined.save(display)
combined.save("webcam" +str(counter).zfill(4) +".jpg")
time.sleep(60)
counter = counter + 1
示例2: Image
# 需要导入模块: from SimpleCV import Image [as 别名]
# 或者: from SimpleCV.Image import adaptiveScale [as 别名]
from SimpleCV import Image
import time
# Load the image
img = Image('ladies.jpg')
# Resize the image, but use the +adaptiveScale()+ function to maintain
# the proportions of the original image
#rather than wrecking the proportions of the original image,it will add padding
adaptImg = img.adaptiveScale((img.width * 2, img.height))
adaptImg.show()
time.sleep(5)