寻找纳米粒子
我需要一些帮助。我有这个示例:
这是一块塑料,里面有一些纳米粒子(您可以看到小黑色点)。有人可以帮助我找出一种快速而肮脏的算法,我可以找到粒子并将它们涂成另一种颜色。
I need some help. I have this sample:
which is a piece of plastic with some nanoparticles inside (you can see the small black dots). Can someone help me figure out a quick and dirty algorithm where I can find the particles and color them in another color.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
又快又脏……好吧:)
Quick and dirty... OK :)
你说“快速而肮脏”,但考虑到这是 matlab,你可能不会注意到最佳解决方案和“快速而肮脏的解决方案”之间的区别。这可能是完成该任务的最佳方法:尺度空间斑点检测。使用拉普拉斯方法是最简单的。
首先使用接近预期纳米粒子标准差的西格玛对图像进行高斯模糊:即屏幕宽度的四分之一。
那么你的斑点将是拉普拉斯算子最负的点;确保它比周围的点具有更大的幅度,然后进行简单的阈值处理就可以了。要了解如何在 matlab 中实现此功能,请访问:
http://dl.acm.org/ itation.cfm?id=363419.363423
大约只有 10 行代码。
另外,当您处理传输而不是反射时,请记住使用对数(分贝)标度。
You say quick 'n dirty, but given this is matlab you probably won't notice a difference between the best solution and a "quick and dirty one". Here is what is probably straight-up the best way to accomplish the task: Scale-space blob detection. Using the laplacian method is the simplest.
Start by Gaussian-blurring you image with a sigma close to that of your expected nano particle standard deviation: IE a quarter of its screen width.
Then your blobs will be the points where the Laplacian is most-negative; ensuring that it has greater magnitude than its surrounding points followed by a simple thresholding will do. To see how to implement this in matlab go to:
http://dl.acm.org/citation.cfm?id=363419.363423
It will only be about 10 lines of code.
Also, remember to work on a logarithmic (decibel) scale as you are dealing with transmission rather than reflection.
这不是在 Matlab 中,而是 WolframBlog 为 Mathematica 介绍了类似的内容,它可能适合您的需求。
This isn't in Matlab, but the WolframBlog covered something like this for Mathematica and it may suit your needs.