Hi Tom, If you want to do motion detection by comparing downsampled images (as you suggested), the correlation coefficient is probably best suited to check for image changes. I've used it for cut recognition in TV advertisement recognition, and an appropriate threshold gives recall of 0.3 at precision of 1.0 (cuts are when the image totally changes ~ maximal motion between images)
Corr. coefficient for images is described in every good digital image processing book, e.g. Digitale Bildverarbeitung (Burger & Burge) is my favorite. http://www.imagingbook.com/index.php?id=59 (chapter 17) has source code in Java, search for corrCoeffMatcher. It's quite simple to port to different languages, basically one loop over the image sufficies to compute this (with some optimization of the code) If there were a camera which outputs true MPEG2, I would happen to know a very good paper describing how to use this to get optical flow motion vectors from the compressed MPEG2 data very fast - but alas, we are dealing with MJPEG here, which is something quite a bit different. A good way to start for something more subtle might be http://en.wikipedia.org/wiki/Jpeg . The luvcview code has a sample decoder in utils.c, jpeg_decode, which might also be helpful. Best, Alex -- Dr. Alexander K. Seewald +43(664)1106886 Seewald Solutions ------------------------------------------------ Information wants to be free; Information also wants to be expensive (S.Brant) --------------- alex.seewald.at ---------------- _______________________________________________ Linux-uvc-devel mailing list [email protected] https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
