如何使用Python处理一系列TIF文件以区分迁移的单核细胞和背景?
tif在3D凝胶中显示单核细胞
/fefala.jpg“ rel =” nofollow noreferrer“>我以前的尝试
长篇小说简短:我有一个单核细胞迁移的3D凝胶视频,该视频被细分为241个TIF文件(每个都代表了特定的时刻) 。如您在图像中所见,单核细胞(小圆圈)看起来与背景非常相似。如何使用Python处理每个TIF文件以使单核细胞从后台脱颖而出?请具体说明并解释所有必要的步骤。我的最终目标是通过OpenCV之类的东西跟踪这些细胞的运动,并随着时间的流逝绘制其轨迹。
以前,我尝试使用略微和全能图,但是我无法使单核细胞与背景不同。
TIF showing monocytes in 3D gel
Long story short: I have a video of monocytes migrating in a 3D gel that is subdivided into 241 TIF files (each represents a specific moment in time). As you can see in the image, the monocytes (little circles) look very similar to the background. How can I process each TIF file using python to make the monocytes stand out from the background? Please be specific and explain all the necessary steps. My ultimate goal is to track the movement of those cells with something like OpenCV and sketch out their trajectories over time.
Previously I tried using skimage and holoviews, but I was unable to make the monocytes appear distinct from the background.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我实际上并没有为您提供完整的答案,但是没有人说答案必须完整,我建议的内容可能会激发您的讨论和交流,以使您更接近解决方案...
首先,我会看您的直方图:
显然,您有一个低对比度的图像,所有亮度在64-88左右,即0..255范围的25%至33%。因此,我的第一个本能是拉伸对比度,以使64变为零,而88变为255。我在这里使用 ImageMagick 来做,因为它是概念性的,您/我们可以用 opencv << /strong>在必要时以后。
然后我们可以复制该图像,模糊并减去删除低频背景功能。首先,有一个小的模糊:
然后用更大的模糊:
或,我们可以返回到我们的原始对比撕裂的图像
1.jpg
尝试以下内容:任何图像处理向导欢迎复制,窃取,不同意,改进,扩展,扩展,在此处编辑任何概念...
I don't actually have a complete answer for you, but nobody said answers have to be complete and what I am suggesting may stimulate discussion and an exchange of ideas that gets you nearer a solution...
Firstly, I would look at your histogram:
You clearly have a low-contrast image with all brightnesses in the range around 64-88, i.e. 25% to 33% of the 0..255 range. So my first instinct is to stretch the contrast so that 64 becomes zero and 88 becomes 255. I am doing it with ImageMagick here because it is conceptual and you/we can do it with OpenCV later if necessary.
We could then copy that image, blur it and subtract to remove the low-frequency background features. Firstly with a small blur:
Then with a larger blur:
Or, we could go back to our original contrast-stretched image
1.jpg
and try CLAHE on that:Any image-processing wizards welcome to copy, steal, disagree, improve, extend, edit any concepts here...
这是另一种使用除法归一化的方法,然后是Python/OpenCV中的一些动态范围拉伸。
输入:
拉伸结果:
Here is another approach using division normalization followed by some dynamic range stretching in Python/OpenCV.
Input:
Stretched Result: