简体   繁体   English

图像的哪些特征将产生用于SVM多类图像分类的良好结果?

[英]What features of images will produce good result used in SVM multiclass image classification?

我正在使用opencv2.4和python 2.7。图像的哪些功能可以用于svm分类。我经历了冲浪和筛选,但作为一个初学者,对我来说似乎很难。其他特征提取技术是什么?

If you are looking for simplest representation then this will help you.These two are very simple compared to other SIFT and SURF 如果您正在寻找最简单的表示,那么这将对您有所帮助。与其他SIFT和SURF相比,这两个非常简单

  1. Bitmap representation 位图表示
  2. HOG-Histogram of Gradients HOG-梯度直方图

SVM is a machine learning model for data classification.I have built a simple svm classifier.If you have two folder of images,birds and squireels.The steps i followed are SVM是一种用于数据分类的机器学习模型。我已经构建了一个简单的svm分类器。如果你有两个图像文件夹,鸟类和squireels。我遵循的步骤是

  1. Extracted Hog features of Images and append that in a list 提取图像的猪特征并将其附加在列表中

     for file in listing1: img = cv2.imread(path1 + file) res=cv2.resize(img,(250,250)) h=hog(res) training_set.append(h) 
  2. append the labels also 还要附加标签

      training_labels.append(1) 
  3. convert both lists to numpy array. 将两个列表都转换为numpy数组。

     trainData=np.float32(training_set) responses=np.float32(training_labels) 
  4. Train SVM 培训SVM

     svm.train(trainData,responses, params=svm_params) 
  5. Test SVM 测试SVM

     result = svm.predict_all(testData) print result 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM