Hello, I'm developing a solution for detecting objects in an image using HOG + SVM. Until then I just set up my database of positive and negative samples.
I was using the OpenCV sample code trainghog.cpp, I just inserted my parameters as below:
const char* keys =
{
"{help h| | show help message}"
"{pd |../../amostras/positivas| path of directory contains possitive images}"
"{nd |../../amostras/negativas| path of directory contains negative images}"
"{td |../../testes| path of directory contains test images}"
"{tv | | test video file name}"
"{dw |64| width of the detector}"
"{dh |64| height of the detector}"
"{d |false| train twice}"
"{t |false| test a trained detector}"
"{v |true| visualize training steps}"
"{fn || file name of trained SVM}"
};
I have not changed any other line of code. Positive images are read, when it comes to negatives, this appears:
Doesanyoneknowwhatthiserrormightbe?
Assuggested,hereisthelinkthatcontainstheexamplecode: link