34 lines
817 B
Python
34 lines
817 B
Python
###################################################################################################
|
|
# Example of using ImageJ functionalities through ijutils.
|
|
###################################################################################################
|
|
|
|
from ijutils import *
|
|
import java.awt.Color as Color
|
|
|
|
#Image Loading
|
|
ip = load_image("{images}/test.png", title="Image")
|
|
|
|
aux = ip.duplicate()
|
|
aux.show()
|
|
grayscale(aux)
|
|
#gaussian_blur(aux); aux.repaintWindow()
|
|
invert(aux); aux.repaintWindow()
|
|
#smooth(aux); aux.repaintWindow()
|
|
#sharpen(aux); aux.repaintWindow()
|
|
|
|
|
|
|
|
#Histogram
|
|
plot(get_histogram(aux))
|
|
|
|
|
|
|
|
|
|
auto_threshold(aux)
|
|
#binary_fill_holes(aux)
|
|
#aux.show()
|
|
(results,output_img)=analyse_particles(aux, 100,5000,
|
|
fill_holes = True, exclude_edges = True,print_table=True)
|
|
output_img.show()
|
|
|