Script execution
This commit is contained in:
@@ -11,6 +11,25 @@ import ch.psi.pshell.imaging.Pen as Pen
|
||||
|
||||
|
||||
|
||||
def detect_pucks(ip):
|
||||
aux = grayscale(ip, in_place=False)
|
||||
threshold(aux,0,50)
|
||||
binary_fill_holes(aux)
|
||||
return analyse_particles(aux, 10000,50000,
|
||||
fill_holes = False, exclude_edges = True,print_table=True,
|
||||
output_image = "outlines", minCirc = 0.0, maxCirc = 1.0)
|
||||
|
||||
def detect_samples(ip):
|
||||
aux = grayscale(ip, in_place=False)
|
||||
invert(aux)
|
||||
subtract_background(aux)
|
||||
auto_threshold(aux)
|
||||
binary_open(aux)
|
||||
return analyse_particles(aux, 250,1000,
|
||||
fill_holes = False, exclude_edges = True,print_table=True,
|
||||
output_image = "outlines", minCirc = 0.7, maxCirc = 1.0)
|
||||
|
||||
|
||||
class MyFilter(Filter):
|
||||
def process(self, image, data):
|
||||
ip = load_image(image)
|
||||
|
||||
Reference in New Issue
Block a user