当前位置: 首页>>代码示例>>Python>>正文


Python Image.adaptiveScale方法代码示例

本文整理汇总了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
开发者ID:rodgomesc,项目名称:SlidesPython,代码行数:32,代码来源:adaptativescale.py

示例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)
开发者ID:popsonebz,项目名称:lesson1,代码行数:12,代码来源:helloWorld15.py


注:本文中的SimpleCV.Image.adaptiveScale方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。