29 lines
773 B
Python
29 lines
773 B
Python
###################################################################################################
|
|
# Example of using ImageJ functionalities through ijutils.
|
|
###################################################################################################
|
|
|
|
from ijutils import *
|
|
import java.awt.Color as Color
|
|
|
|
ip2 = load_image("images/img2.png", title="Image2")
|
|
|
|
|
|
|
|
show_panel(ip2.getBufferedImage(), "Original")
|
|
|
|
#Particle Analysis
|
|
ip = grayscale(ip2, in_place = False)
|
|
auto_threshold(ip)
|
|
binary_op(ip, "fill_holes")
|
|
|
|
|
|
show_panel(ip.getBufferedImage(), "Binarization")
|
|
#binary_fill_holes(ip)
|
|
#ip.show()
|
|
(results,output_img)=analyse_particles(ip, 100,1000, print_table=True)
|
|
#output_img.show()
|
|
|
|
show_panel(output_img.getBufferedImage(), "Particle Analysis")
|
|
|
|
|