我使用HOGDescriptor.compute()
尝试从图片中获取描述符(包括人物),但所有值都在"向量描述符"是积极的,我认为这是不可能的。代码就像轰鸣声。
矢量描述符;
cv::HOGDescriptor hog_roi(cvSize(width, height), cvSize(16, 16), cvSize(8, 8),cvSize(8, 8), 9);
hog_roi.compute(image_roi2, descriptors, Size(8, 8), Size(0, 0));
我得到的描述符是这样的,我不能用它来搜索人:
SVMDetector:[2.66110718e-01,2.68318206e-01,2.68318206e-01, 2.17726320e-01,2.51462460e-01,2.35204116e-01,7.31925964e-02, 5.84346727e-02,1.52689770e-01,1.61342099e-01,1.86763927e-01, 1.75199494e-01,1.68729022e-01,1.86727673e-01,7.84099624e-02, 4.26537208e-02,5.24105318e-02,7.59865493e-02,3.55061926e-02, 6.99645728e-02,2.19995320e-01,2.68318206e-01,2.68318206e-01, 1.78995952e-01,6.61719888e-02,2.86846794e-02,2.449618683e-02, 3.13862711e-02,1.32574379e-01,1.88612297e-01,2.33186215e-01, 2.14858532e-01,1.11005612e-01,5.74433915e-02,5.83223514e-02, 5.41414283e-02,6.72073513e-02,2.49409005e-01,2.57455558e-01, 1.27111375e-01,1.64344728e-01,4.28766869e-02,4.97805066e-02,......
但像这样的opencv演示描述符,它可以正常工作。 static const float detector [] = { 0.05359386f,-0.14721455f,-0.05532170f,0.05077307f, 0.11547081f,-0.04268804f,0.04635834f,-0.05468199f,0.08232084f, 0.10424068f,-0.02294518f,0.01108519f,0.01378693f,0.11193510f, 0.01268418f,0.08528346f,-0.06309239f,0.13054633f,0.08100729f, -0.05209739f,-0.04315529f,0.09341384f,0.11035026f,-0.07596218f, -0.05517511f,-0.04465296f,0.02947334f,0.04555536f, -3.55954492e-003f,0.07818956f,0.07730991f,0.07890715f,0.06222893f, 0.09001380f,-0.03574381f,0.03414327f,0.05677258f,-0.04773581f, 0.03746637f,-0.03521175f,0.06955440f,-0.03849038f,0.01052293f,......
我的照片就像这样enter image description here
答案 0 :(得分:0)
我的opencv是2.4.13,我试过几张图片,所有HOG描述符都是正值,任何人都可以提供一个提示?可能是opencv HOG的bug?为什么人们“探测器[]”的演示包括正面和负面。