Motion Detection

后端 未结 2 649
情话喂你
情话喂你 2021-02-08 02:25

I really cannot get my head around this, so I hope that someone can give me a little hand ^^

I\'m trying to detect motion in C# via my webcam.

So far I\'ve trie

2条回答
  •  耶瑟儿~
    2021-02-08 02:43

    Motion detection is a complex matter, and it requires a lot of computing power.

    Try to limit what you want to detect first. With increasing complexity: Do your want to detect whether there is motion or not? Do you want to detect how much motion? Do you want to detect which areas of the image are actually moving?

    I assume you just want to know when something changed:

    • subtract adjacent frames from each other
    • calc the sum of all squares of all pixel differences
    • divide by number of pixels
    • watch the number for your webcam stream. It will have a certain ground noise and will significantly go up when something moves.
    • try to limit to a certain color channel only, this may improve things

提交回复
热议问题