24 lines
663 B
Python
24 lines
663 B
Python
from ijutils import *
|
|
import java.awt.Color as Color
|
|
|
|
|
|
#ip = load_array(img.getData().getMatrix())
|
|
ip = load_image(img.getOutput())
|
|
#ip = load_image("{images}/test3.png", title="Image")
|
|
|
|
|
|
aux = grayscale(ip, in_place=False)
|
|
aux.show()
|
|
|
|
#convolve(aux, KERNEL_SOBEL); aux.repaintWindow()
|
|
|
|
invert(aux); aux.repaintWindow()
|
|
subtract_background(aux); aux.repaintWindow()
|
|
auto_threshold(aux); aux.repaintWindow()
|
|
binary_open(aux); aux.repaintWindow()
|
|
|
|
(table, image) = analyse_particles(aux, 250,1000,
|
|
fill_holes = False, exclude_edges = True,print_table=True,
|
|
output_image = "outlines", minCirc = 0.82, maxCirc = 1.0)
|
|
|
|
image.show() |