Closedown
This commit is contained in:
@@ -30,8 +30,26 @@ class RobotTCP(TcpDevice):
|
||||
|
||||
add_device(RobotTCP("robot_tcp", "127.0.0.1:3333"), force = True)
|
||||
|
||||
import ch.psi.pshell.imaging.Data as Data
|
||||
class Exposure(Writable):
|
||||
def write(self,pos):
|
||||
cam.setExposure(pos)
|
||||
exposure=Exposure()
|
||||
add_device(exposure, force = True)
|
||||
|
||||
|
||||
class Contrast(Readable):
|
||||
def read(self):
|
||||
data = img.getData()
|
||||
roi = Data(data.getRectSelection(500,300,700,600))
|
||||
return roi.getGradientVariance()
|
||||
contrast=Contrast()
|
||||
add_device(contrast, force = True)
|
||||
|
||||
|
||||
def detect_pucks(ip):
|
||||
"""
|
||||
"""
|
||||
aux = grayscale(ip, in_place=False)
|
||||
threshold(aux,0,50)
|
||||
binary_fill_holes(aux)
|
||||
@@ -39,7 +57,9 @@ def detect_pucks(ip):
|
||||
fill_holes = False, exclude_edges = True,print_table=True,
|
||||
output_image = "outlines", minCirc = 0.4, maxCirc = 1.0)
|
||||
|
||||
def detect_samples(ip):
|
||||
def detect_samples(ip):
|
||||
"""
|
||||
"""
|
||||
aux = grayscale(ip, in_place=False)
|
||||
invert(aux)
|
||||
subtract_background(aux)
|
||||
|
||||
Reference in New Issue
Block a user