Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

prevGrey's scope is within the imageDetect scope, thus it is destroyed on every iteration of the function. Either define prevGrey as static or make it a member variable that is updated at each iteration.