shape-based-watershed.ijm 423 Bytes
Newer Older
Christian Tischer's avatar
Christian Tischer committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#@File binary

// open image
run("Close All");
open(binary);
rename("binary");

// compute distance map
run("Chamfer Distance Map", "distances=[Chessknight (5,7,11)] output=[32 bits] normalize");

// invert
run("Invert");

// smooth
run("Gaussian Blur...", "sigma=10");
rename("inverted_distances");

// watershed
run("Classic Watershed", "input=inverted_distances mask=binary use min=0 max=255");
rename("split_objects");