如何计算“绿点”的数量?在图像中?
你好 我有一堆图像。让我们假设它们都具有相同的大小。 图像有黑色背景和一些准圆形绿点 代表荧光。我必须计算金额(百分比) 每个图像的荧光。即绿点的面积。
知道如何做到这一点,例如在 Java 中吗?
Hi
I have a bunch of images. Let's assume all of them of the same size.
The images have a black background and some quasi round green spots
which represent fluorescence. I have to calculate the amount (in percentage)
of fluorescence of each image. I.e. the area of green spots.
Any idea how to do this, for example in Java?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这是图像处理中的标准问题,称为图像分割。您将能够找到大量有关它的信息。
特别是,这是显微图像处理中的常见问题,而这正是您正在做的事情。我认为 ImageJ 中可能有预装操作来执行此操作;如果没有,这将是 ImageJ 中的一个相当简单的宏,并且由于 ImageJ 是在 java 中,因此如果您愿意,您可以使用 ImageJ 的库编写 java 代码。
我建议您采用一种方法:
的 种子在执行 K 均值步骤时,您可以从直方图中选择一个阈值(例如,查找两个峰值之间的山谷),然后对其进行分段。或者使用某种自适应分割(例如,将像素与其邻域的中值进行比较),但这需要一些调整。
This is a standard problem in image processing, and is called image segmentation. You will be able to find vast quantities of information about it.
In particular, this is a common problem in microscopic image processing, which is what you're doing. I think there might be canned operations to do it in ImageJ; if not, it would be a fairly simple macro in ImageJ, and since ImageJ is in java, you could write java code using ImageJ's libraries if you like.
I would suggest an approach in which you:
Instead of doing the K-means step, you could just pick a threshold from the histogram (look for the valley between the two peaks, say), and segment on that. Or use some sort of adaptive segmentation (comparing pixels to the median in their neighbourhood, say), but that will require some tuning.
一些想法:
A few thoughts:
我现在没有时间详细介绍,但我可以为您概述该过程:
循环遍历图像
(注意:这可能是一种非常幼稚的方法,并且可以进行大量优化,但这应该是一个开始)
I don't have the time to go into detail now, but I can outline the process for you:
Loop through the images
(NB: this is probably a very naive way to do it and there is loads of optimisation possible, but it should be a start)
例如,您可以使用imagemagik,请参阅http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=16177
You could e.g. use imagemagik, see http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=16177