C#: Fast and Smart algorithm to Compare two byte array (image) -


i'm running process on webcam image. i'd wake process if there major changes.

  • something moving in image
  • lights turn on
  • ...

so i'm looking fast efficient algorithm in c# compare 2 byte[] (kinect image) of same size.

  • i need kind of "diff size" threashold
  • i found motion detection algorithm it's "too much"
  • i found xor algorithm might simple ? great if ignore small change sunlight, vibration, etc, ...

  1. mark pixels different previous image (based on threshold i.e. if pixel has been changed - ignore noise) 'changed'

  2. filter out noise pixels - i.e. if pixel marked changed neighbors not - consider noise , unmark changed

  3. calculate how many pixels changed on image , compare threshold (you need calibrate manually)

  4. make sure operating on greyscale images (not rgb). i.e. convert yuv image space , comparison on y.

this simplest , fastest algorithm - need tune these 2 thresholds.


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -