I have a binary image of separated spots.
Is there any ImageJ plugin that could construct convex hull of all spots?
Or could you recommend another program, not ImageJ, that can do this?
I have a binary image of separated spots.
Is there any ImageJ plugin that could construct convex hull of all spots?
Or could you recommend another program, not ImageJ, that can do this?
With OpenCV you can use findContours() and then convexHull()
You can see a complete example here: https://docs.opencv.org/2.4/doc/tutorials/imgproc/shapedescriptors/hull/hull.html
OpenCV is a library, which means that you have to code the program yourself. It has bindings for Java, python and many other languages. You can easily find the same example in other languages:
Provided you have an 8-bit (binary) image in ImageJ, you can run the following Groovy script from the script editor to get the convex hull as current selection:
#@ ImagePlus imp
import ij.gui.PolygonRoi
import ij.gui.Roi
import ij.plugin.filter.ThresholdToSelection
import ij.process.ImageProcessor
imp.getProcessor().setThreshold(128,255,ImageProcessor.NO_LUT_UPDATE)
roi = ThresholdToSelection.run(imp)
proi = new PolygonRoi(roi.getContainedFloatPoints(), Roi.POLYGON)
chRoi = new PolygonRoi(proi.getConvexHull(), Roi.POLYGON)
imp.setRoi(chRoi)
Note that in general, this type of question might be considered off-topic here and is better asked on the ImageJ forum, where you'll get advice from image processing experts.