简体   繁体   中英

Detect motion in live MJPEG file using Javascript?

I'm trying to program an application for an IP camera of mine. I want it to be able to take the IP address of the camera and detect motion (a change of a certain number of pixels in a certain space). I really have no idea how I'm going to go about this, and I can't find many tutorials. A lot of them are node.js, and the other ones use APIs or external libraries. I do not use APIs or any other external code. (I know it's a bit weird, but I have my reasons) I'm very sorry that this question probably wasn't the best, but I've been trying to find info on how to do this kind of thing and I can't find much on the web. Thanks in advance!

Edit: Some were confused as to whether I was using node.js. I'm using browser-based javascript.

You can use image moments to estimate motion between images. Some CS reading about it ( or google it up ): https://core.ac.uk/download/pdf/82353641.pdf

Event most basic moments will be sufficient for simple motion detection

Ages ago I developed open source project which also calculates moments ( in java ) https://sourceforge.net/projects/javaocr/

Even simple center of mass would be sufficient for simple motion detection ( higher order moments are necessary for pattern matching )

Also interesting reading would be on Hu moments

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM