我应该使用直方图或其他一些高级数学工具(例如贝叶斯网络)进行材料分类/识别吗?

发布于 2024-11-28 23:10:37 字数 370 浏览 4 评论 0原文

我正在学习 OpenCV 的基础知识,我认为一个好的项目可以帮助我让学习变得更有趣。经过思考一些想法后,我想出了一些材料识别项目。比方说,我给自己买了一台输送机,它正在运输用于生产某些产品的材料(这个产品并不重要)。有 3 种材料,照明条件会有所不同(早上到下午使用自然光,晚上使用灯泡)。这就是问题描述。

我正在考虑使用沙子、木材和岩石,这些都很容易获得。并将它们放在塑料表面上。拍完照片后,我将应用一些直方图来获取颜色,并使用该颜色来识别材质。但是,由于闪电条件会随着时间的推移而变化,当我拍摄这张照片并应用直方图时,颜色会发生变化,并且无法正确识别材质。我想,如果我使用沙子和灰尘,它们的颜色非常相似,但质地不同,有什么可以帮助我吗?

我只是想要一些想法,也许该领域的一些专家可以指导我。

I'm learning the basics of OpenCV, and I thought a good project would help me make the studying more fun. After thinking some ideas I came up with some material recognition project. Let's say, I got myself a conveyor and it's transporting material for production of some product ( this product don't really matter, tho). There are 3 materials, and the illumination conditions will vary, (using natural light at the morning through the afternoon, and a light-bulb at night). That would be the problem description.

I was thinking of using sand, wood and rocks, which are easy to get. and place them on a plastic surface. After taking a pic, I'll apply some histogram to get the color, and using this color I'll identify the material. But, since the lightning conditions will change over time, when i take this photograph and apply the histogram, the color will change and the material won't be recognized properly. And I thought, what if I were to use sand and dust, they have very similar color, but different texture, is there something that can help me with that?

I just want some ideas, and maybe some expert in the field could guide me.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

清欢 2024-12-05 23:10:37

对于一个起始项目来说,这是一个相当先进的想法。可以通过使用 HSV 或其他色彩空间并采用色相分量来解决光照差异。然而,“纹理”的问题可以通过两种方式处理:

  1. 特征描述符:如果处理灰度图像,则会有一组称为灰度共现的特征描述符矩阵 (GLCM),用于测量图像中不同区域的纹理。这存在于 Matlab 中,对于 OpenCV 有以下代码: C 中

    因此,您可以拍摄几张沙子、木头和岩石的标准照片,并将它们用作分类器(NN、SVM、OpenCV 的 Haar 分类器等)的训练样本。然后用负样本训练它。分类器的特征向量将是每张图片的 GLCM 输出。然后在实际图片上运行它,看看它们有多准确。

  2. 纹理粗糙度:遇到这篇有用的论文展示了一种称为特征变换的纹理“粗糙度”的单值度量。计算非常简单,特别是如果您使用 OpenCV 的 SVD() 进行特征值计算。特征变换的结果给出与该部分的粗糙度相对应的值。这可用于分离出所需的部分。

Quite an advanced idea for a starting project. The differences in lighting could be tackled by using the HSV or other color spaces, taking the Hue component. However the matter of "texture" can be handled in two ways:

  1. Feature descriptors: If you deal with the grey level image, there are a set of feature descriptors called the Grey Level Co-occurrence Matrix (GLCM) that gives a measure of the textures of different regions in the image. This is present in Matlab, for OpenCV there is the following code: in C.

    So you could take several standard shots of the sand, wood and rocks and use them as training samples on a classifier - NN, SVM, OpenCV's Haar classifier, whatever. Then train it with negative samples. The feature vector for the classifier will be the GLCM output for each picture. Then run it on the actual pictures and see how accurate they are.

  2. Texture Roughness: Came across this useful paper that shows a single-valued measure for the 'roughness' of a texture called the Eigen Transform. The calculations are quite simple, especially if you use OpenCV's SVD() for eigenvalue calculations. The result of the Eigen-transform gives a value corresponding to the roughness of that portion. This can be used to separate out required portions.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文