CV_Error(CV_StsOutOfRange,"Learning rate for Operator () must be between 0.0 and 1.0.\n");
for(inti=0;i<nfeatures;++i)
weights[i]/=total;
}
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
/*
* 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()