本文整理汇总了Python中SimpleCV.Image.findLines方法的典型用法代码示例。如果您正苦于以下问题:Python Image.findLines方法的具体用法?Python Image.findLines怎么用?Python Image.findLines使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimpleCV.Image
的用法示例。
在下文中一共展示了Image.findLines方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Image
# 需要导入模块: from SimpleCV import Image [as 别名]
# 或者: from SimpleCV.Image import findLines [as 别名]
from SimpleCV import Image, Color
img = Image("ex24a.jpg")
# Here is where the magic happens
lines = img.findLines() # The parameter at findLines() regulates the length of a minimum line to be found
# Drawing the lines on the img
lines.draw(Color.RED, width=2)
img.show()
示例2: Rho
# 需要导入模块: from SimpleCV import Image [as 别名]
# 或者: from SimpleCV.Image import findLines [as 别名]
import numpy as np
imagen=Image('/home/pi/lunar_con_pelos.png')
#imagen.show()
#se prueba distintos metodos para ver si detecta los bellos en la piel
ed=imagen.edges()
edg=imagen+ed
edg.save('bordes_edge.png')
grad = imagen.morphGradient()
grd = imagen+grad
grd.save('bordes_gradiente.png')
lineas=imagen.findLines()
lineas.draw(Color.RED,width=3)
#imagen.show()
imagen.save("linbeas.png")
resu = imagen.resize(320,240) #se redefine la imagen para que tenga un menor tiempo
#de procesamiento
gray=resu.grayscale()
inv=gray.invert()
sumimg=resu+inv
res=(resu*1.5)-(gray/2)
res.save('muestras/imagen_tratada.png')
[red, green, blue]=res.splitChannels(False)
def Rho(A,B): # A es el color del lunar y B es el color de la piel
示例3: Image
# 需要导入模块: from SimpleCV import Image [as 别名]
# 或者: from SimpleCV.Image import findLines [as 别名]
#!/usr/local/env python
# coding=utf-8
#
# Author: Archer Reilly
# Desc: 按照颜色找出物体blob
# File: FindLines.py
# Date: 30/July/2016
#
from SimpleCV import Color, Image
# img = Image('/home/archer/Downloads/Chapter 8/mandms-dark.png')
img = Image('/home/archer/Downloads/1185391864.jpg')
# blue_distance = img.colorDistance(Color.BLUE).invert()
# blue_distance = img.colorDistance(Color.BLACK).invert()
# blobs = blue_distance.findBlobs(minsize=15)
lines = img.findLines(threshold=20)
lines.draw(Color.RED, width=3)
img.save('res.png')
img.show()
# blobs.draw(color=Color.RED, width=3)
#
# blue_distance.show()
#
# img.addDrawingLayer(blue_distance.dl())
# img.save('res.png')
# img.show()