0

I'm running windows 7, and i'm trying to get some haar training done to make a haar classifier. I've got to the point were i need to merge a folder full of .vec files. I've been working on this for the better part of a day. I've tried following coding robin's tutorial but i get an error of:

g++.exe": pkg-config: No such file or directory  
g++.exe": opencv -I.: No such file or directory  
g++.exe": installation problem, cannot exec `cpp': No such file or directory

is this "installation problem" a problem with my g++ install? I'm still not sure.

those files (or directories) aren't in my opencv folder so i'm not really sure what to do about that. I vaguely remember reading that those were for if you were installing it with linux or something so i tried a different method.

I couldn't get Naotoshi Seo's to work because i can't download the mergevec.exe file anywhere. I always get a "your computer or network may be sending automated queries. To protect our users, we can't process your request right now." I've done virus scans i've tried downloading from different computers and networks nothing works. since the previous method of compiling the mergevec.cpp file didn't work for me either, I then looked for yet another method where i found this tutorial[3] for using python. So I installed python 2.7.9 and ran this in command prompt

"C:\Users\Austin\Desktop\Recog_Project>python mergevec.py -v samples -o weed_samples.vec"

and i got this as a result

Traceback (most recent call last):  
File "mergevec.py", line 170, in <module>  
merge_vec_files(vec_directory, output_filename)  
File "mergevec.py", line 133, in merge_vec_files  
val = struct.unpack('<iihh', content[:12])  
struct.error: unpack requires a string argument of length 12"

I don't know what to do anymore to try and get this to work.

I've tried installing Ubuntu on a virtual machine, but i can't even figure out how to change the resolution from 640:480. Ran these commands in terminal and restarted and got nothing.

sudo apt-get install virtualbox-guest-dkms
virtualbox-guest-utils virtualbox-guest-x11

I also did something with some drivers but I can't remember what it was. basically this is my last hope. I'm out of ideas. I'll of course keep looking and for answers and will post any progress i make. Any help at all would be greatly appreciated as my job is on the line. I could skype screen share if it would be helpful too. Thanks in advance.

3: github.com/wulfebw/mergevec guess i need more rep to post additional links.

4

1 回答 1

0

几个小时内就有人在 opencv Q&A 上回答了这个问题。如果您有任何 OpenCV 问题,我强烈建议您先去那里,因为更有可能有人会在他们的页面上回答您的问题。这是我收到的答案。

  • 您不需要合并 vec 文件以使用级联弱分类器方法进行对象分类器训练。我一直想知道为什么人们会合并 vec 文件,而答案总是因为他们想创建人工数据向量。如果您希望您的模型做一些有意义的事情,请不惜一切代价避免这种情况。

  • 跳过完整的 haar 训练界面,进入 traincascade 界面,它得到了更好的支持、更无错误和更好的支持。

  • 从 traincascade 开始,在 Description 中创建样本信息
于 2015-03-01T15:40:10.583 回答