the text says "The overloaded operators for ofxCvImage make such running averages straightforward." however this only seems true for ofxCvFloatImage. If the background image is a type of ofxGrayscaleImage (or any other than floatImage), the example will not work.
my workaround, which may not be the best way, was:
`//convert grayImage and grayBg to ofxCvFloatImage versions, multiply then convert back to grayImage
grayImageFloat = grayImage; //from ofxGrayscaleImage to ofxFloatImage
grayBgFloat = grayBg;
grayImageFloat *= 0.01;
grayBgFloat *= 0.99;
grayBgFloat += grayImageFloat;
grayBg = grayBgFloat; // back to ofxGrayscaleImage`
I just ran into the same issue and your workaround helped me get through the last part of the chapter. It would be good to see a clarification in the docs what the best way to do this is
the text says "The overloaded operators for ofxCvImage make such running averages straightforward." however this only seems true for ofxCvFloatImage. If the background image is a type of ofxGrayscaleImage (or any other than floatImage), the example will not work. my workaround, which may not be the best way, was:
`//convert grayImage and grayBg to ofxCvFloatImage versions, multiply then convert back to grayImage