Exemplo n.º 1
0
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
Exemplo n.º 2
0
from SimpleCV import Image
import time
img=Image('/home/pi/book/test_set/1.5.01.tiff')
lines=img.findLines()
lines.draw(width=3)
img.show()
time.sleep(5)
Exemplo n.º 3
0
#!/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()
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()
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()