本文整理汇总了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]