Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Heh, I answer on my own question))It is possible to use CvHaarClassifierCascade structure in such manner:

CvHaarClassifierCascade* c = (CvHaarClassifierCascade*)cvLoad("haarcascade_frontalface_alt.xml", 0, 0, 0);
for (int i = 0; i< c->count; i++)
{
    CvHaarStageClassifier* stage = c->stage_classifier + i;
    for (int j = 0; j < stage->count; j++)
    {
        CvHaarClassifier* hc = stage->classifier + j;
        for (int k = 0; k < hc->count; k++)
        {
            CvHaarFeature* feature = hc->haar_feature + k;
            if(feature->tilted) std::cout << "has titled!";
        }
    }
}
click to hide/show revision 2
removed impertinent text

updated 2013-02-21 10:08:06 -0600

SR gravatar image

Heh, I answer on my own question))It It is possible to use CvHaarClassifierCascade CvHaarClassifierCascade structure in such manner:

CvHaarClassifierCascade* c = (CvHaarClassifierCascade*)cvLoad("haarcascade_frontalface_alt.xml", 0, 0, 0);
for (int i = 0; i< c->count; i++)
{
    CvHaarStageClassifier* stage = c->stage_classifier + i;
    for (int j = 0; j < stage->count; j++)
    {
        CvHaarClassifier* hc = stage->classifier + j;
        for (int k = 0; k < hc->count; k++)
        {
            CvHaarFeature* feature = hc->haar_feature + k;
            if(feature->tilted) std::cout << "has titled!";
        }
    }
}