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


Python Image.findLines方法代码示例

本文整理汇总了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()
开发者ID:italofernandes84,项目名称:Python-SimpleCV_Course_Examples,代码行数:12,代码来源:ex24.py

示例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
开发者ID:nashoalfonso,项目名称:PDI,代码行数:33,代码来源:l4.py

示例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()
开发者ID:csrgxtu,项目名称:ComputerVision,代码行数:31,代码来源:FindLines.py


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