您的位置:首页 > 运维架构

emgu cv hog 特征提取 与opencv 生成的结果略有区别

2013-08-28 15:55 399 查看
//////////////////////////////////////////////////////////////////参数设定////////////////////////////////根据自己的参数设置///////////////////////
Rectangle rc = new Rectangle();
rc.Width = 28;
rc.Height = 28;//tuxaing daxiao

Rectangle rc1 = new Rectangle();
rc1.Width = 14;
rc1.Height = 14;//bloke

Rectangle rc2 = new Rectangle();
rc2.Width = 7;
rc2.Height = 7;

Rectangle rc3 = new Rectangle();
rc3.Width = 7;
rc3.Height = 7;

///////////////设置参数//////////////////////////////////////////////
System.Drawing.Size r1 = new System.Drawing.Size();
r1.Width = 1;
r1.Height = 1;
System.Drawing.Size r2 = new System.Drawing.Size();
r2.Width = 0;
r2.Height = 0;
HOGDescriptor hog = new HOGDescriptor(rc.Size, rc1.Size, rc2.Size, rc3.Size, 9, 1, -1.0000000000000000, 0.20000000000000001, false);
float[] yy = new float[1000000];
yy = hog.Compute(src,  r1,r2, null);//src为要提取特征的图像,yy为生成特征的数组


但是我发现一个问题,同样的参数在opencv 上面显示的hog特征数据略有不同,不知道是什么原因。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: