请选择 进入手机版 | 继续访问电脑版

Hello Mat

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 43|回复: 0

分类器特征提取

[复制链接]

645

主题

760

帖子

4121

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
4121
发表于 2018-12-1 22:31:55 | 显示全部楼层 |阅读模式
对应一组图像而言,图像分类应用较为广泛,如何选取特征很关键:
  1. FeatureVector := []
  2. * Compute features.
  3. gen_sobel_features (Image, FeatureVector, FeatureVector)
  4. * Downscale the image (image pyramid) and compute features.
  5. zoom_image_factor (Image, Zoomed1, 0.5, 0.5, 'constant')
  6. gen_sobel_features (Zoomed1, FeatureVector, FeatureVector)
  7. * Uncomment lines to use further pyramid levels:
  8. zoom_image_factor (Zoomed1, Zoomed2, 0.5, 0.5, 'constant')
  9. * gen_sobel_features (Zoomed2, FeatureVector, FeatureVector)
  10. * zoom_image_factor (Zoomed2, Zoomed3, 0.5, 0.5, 'constant')
  11. * gen_sobel_features (Zoomed3, FeatureVector, FeatureVector)
  12. * zoom_image_factor (Zoomed3, Zoomed4, 0.5, 0.5, 'constant')
  13. * gen_sobel_features (Zoomed4, FeatureVector, FeatureVector)
  14. FeatureVector := real(FeatureVector)
复制代码
gen_sobel_features如下:
  1. * Coocurrence matrix for 0 deg and 90 deg:
  2. cooc_feature_image (Image, Image, 6, 0, Energy, Correlation, Homogeneity, Contrast)
  3. cooc_feature_image (Image, Image, 6, 90, Energy, Correlation, Homogeneity, Contrast)
  4. * Absolute histogram of edge amplitudes:
  5. sobel_amp (Image, EdgeAmplitude, 'sum_abs', 3)
  6. gray_histo_abs (EdgeAmplitude, EdgeAmplitude, 8, AbsoluteHistoEdgeAmplitude)
  7. * Entropy and anisotropy:
  8. * entropy_gray (Image, Image, Entropy, Anisotropy)
  9. * Absolute histogram of gray values:
  10. * gray_histo_abs (Image, Image, 8, AbsoluteHistoImage)
  11. * Add features to feature vector:
  12. FeaturesExtended := [Features,Energy,Correlation,Homogeneity,Contrast]
  13. FeaturesExtended := [FeaturesExtended,AbsoluteHistoEdgeAmplitude]
  14. * FeaturesExtended := [FeaturesExtended,Entropy,Anisotropy]
  15. * FeaturesExtended := [FeaturesExtended,AbsoluteHistoImage]
复制代码
金字塔式的纹理特征求解;

程序:算法QQ  3283892722
群智能算法视频售价:38元,链接http://halcom.cn/forum.php?mod=forumdisplay&fid=73
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则


Python|Opencv|MATLAB|Halcom.cn  

GMT+8, 2018-12-11 19:25 , Processed in 0.814859 second(s), 24 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表