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


Python Image.flipVertical方法代码示例

本文整理汇总了Python中SimpleCV.Image.flipVertical方法的典型用法代码示例。如果您正苦于以下问题:Python Image.flipVertical方法的具体用法?Python Image.flipVertical怎么用?Python Image.flipVertical使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SimpleCV.Image的用法示例。


在下文中一共展示了Image.flipVertical方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: process

# 需要导入模块: from SimpleCV import Image [as 别名]
# 或者: from SimpleCV.Image import flipVertical [as 别名]
	def process(self, iname):
		
		cam = picamera.PiCamera()
		cam.capture("imgs/moment.jpg")
	
		img = Image("imgs/moment.jpg")
		flip = img.flipVertical()
		binaryFlip = flip.binarize().invert()
		edges = binaryFlip.edges()
		#boxLayer = DrawingLayer((img.width, img.height))
		#boxLayer.rectangle((0, 0), (img.width, img.height), 
		#	color=Color.BLACK, filled=True)

		print "Processing image..."
		print "Please wait"

		#winsize = (img.width, img.height)#Set size for display
		#display = Display(winsize)#Create a display

		#blobs = flip.edges().findBlobs() #make the image with only edges and finde its blobs
		#blobs.image = img
		#img.addDrawingLayer(boxLayer)

		#blobs[-1].drawHull(color=Color.BLUE)

		#Correct rotation axis
		#correctAngle = blobs[-1].angle()
		#rot = img.rotate(correctAngle)
		#blobs[-1].rotate(correctAngle)
		
		#rotBlob = rot.findBlobs()

		#flip.dl().polygon(blobs[-1].mConvexHull,color=Color.RED, width=2)

		#rot.addDrawingLayer(boxLayer)#make the rot layer black

		lines = edges.findLines(threshold=10)#find lines in rotated image
		lines.draw(width=2, color=(255,0,0))#draw all lines in rotated image

		# while not display.isDone():
		# 	#rotBlob[-1].show()
		# 	rot.show()

		flip.save("imgs/raw-" + iname + ".jpg")
		edges.save("imgs/cv-" + iname + ".jpg")
		#rot.save("imgs/" + iname + ".jpg")
		# writeToServer('imgs/saved/1.jpg')
		return [lines]
开发者ID:fitosegrera,项目名称:aesthetic_measure,代码行数:50,代码来源:birkhoff.py


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