【发布时间】:2018-08-14 15:14:41
【问题描述】:
【问题讨论】:
标签: image-processing imagej binary-image fiji
【问题讨论】:
标签: image-processing imagej binary-image fiji
使用 OpenCV,您可以使用 findContours(),然后使用 convexHull()
您可以在此处查看完整示例:https://docs.opencv.org/2.4/doc/tutorials/imgproc/shapedescriptors/hull/hull.html
OpenCV 是一个库,这意味着您必须自己编写程序。它具有 Java、python 和许多其他语言的绑定。您可以轻松找到其他语言的相同示例:
【讨论】:
如果您在 ImageJ 中有一个 8 位(二进制)图像,您可以从 script editor 运行以下 Groovy 脚本来获取凸包作为当前选择:
#@ 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)
请注意,一般而言,此类问题在这里可能被视为题外话,最好在 ImageJ forum 上提问,在那里您可以从图像处理专家那里获得建议。
【讨论】:
Edit-Selection-make 选择,然后是 ConvexHull
【讨论】: