Ask Your Question

michaels's profile - activity

2015-01-28 12:34:13 -0600 commented answer Error in parameter of traincascade?

i added printf after imgreader seems reading more than images in the folder ?

now i add protection

        if( predict( i ) == 1.0F )
        {
            getcount++;
            printf("%s current samples: %d\r", isPositive ? "POS":"NEG", getcount);
            break;
        }
        else if (isPositive)//mic
        {
            i++;
        }
2015-01-28 12:25:55 -0600 answered a question Error in parameter of traincascade?

hi you need to try to debug train-cascade solution to see the issue it seems to stack inside

int CvCascadeClassifier::fillPassedSamples( int first, int count, bool isPositive, int64& consumed )
{
    int getcount = 0;
    Mat img(cascadeParams.winSize, CV_8UC1);
    for( int i = first; i < first + count; i++ )
    {
        for( ; ; )
        {
            **bool isGetImg = isPositive ? imgReader.getPos( img ) :
                                           imgReader.getNeg( img );**
            if( !isGetImg )
                return getcount;
            consumed++;

            featureEvaluator->setImage( img, isPositive ? 1 : 0, i );
            if( predict( i ) == 1.0F )
            {
                getcount++;
                printf("%s current samples: %d\r", isPositive ? "POS":"NEG", getcount);
                break;
            }
        }
    }
    return getcount;
}
2014-09-23 01:49:48 -0600 asked a question how to detect new shape use background subtractor

hello now background subtraction work on video learns from all image the background and if new shape come it is foreground , i want to detect shape , i know the shape located in the center of image +- some pixels, the backrgound is in the edges of the image +- pixels how i can use background subtraction for find the shape i want to use Gaussian mixture model such as in http://mateuszstankiewicz.eu/?p=189#comment-16981