I would like to implement a motion detecting camera in Qt/QML for Nokia N9. I hoped that there would be some built in methods for computing image differences but I can't find any in the Qt documentation.
My first thoughts were to downscale two consecutive images, convert to one bit per pixel, compute XOR, and then count the black and white pixels.
Or is there an easy way of using a library from somewhere else to achieve the same end?
Edit: I've just found some example code on the Qt developer network that looks promising: Image Composition Example.
To compare images qt has QImage::operator==(const QImage&). But i don't think it will work for motion detection.
But this may help: Python Motion Detection Library + Demo.