CV_Error(CV_StsError,"BackgroundSubstractorGMG has not been initialized. Call initialize() first.\n");
}
/*
* Update learning rate parameter, if desired
*/
if(newLearningRate!=-1.0)
{
if(newLearningRate<0.0||newLearningRate>1.0)
for(inti=0;i<nfeatures;++i)
{
CV_Error(CV_StsOutOfRange,"Learning rate for Operator () must be between 0.0 and 1.0.\n");
if(color==colors[i])
returnweights[i];
}
this->learningRate=newLearningRate;
}
Matimage=_image.getMat();
_fgmask.create(imHeight,imWidth,CV_8U);
fgMaskImage=_fgmask.getMat();// 8-bit unsigned mask. 255 for FG, 0 for BG
// not in histogram, so return 0.
return0.0f;
}
/*
* Iterate over pixels in image
*/
// grab data at each pixel (1,2,3 channels, int, float, etc.)
// grab data as an array of bytes. Then, send that array to a function that reads data into vector of appropriate types... and quantizing... before saving as a feature, which is a vector of flexitypes, so code can be portable.
// multiple channels do have sequential storage, use mat::elemSize() and mat::elemSize1()