EloquentEsp32cam icon indicating copy to clipboard operation
EloquentEsp32cam copied to clipboard

Nice to have feature: Anomaly detection

Open jksemple opened this issue 1 year ago • 1 comments

This is a variant of motion detection to meet a different requirement. Motion detection detects significant differences between successive frames from the camera. In the event of an object moving into the field of view and staying there for some while motion detection will produce a signal at the start and end of the period while anomaly detection will produce a signal for the entire period that the object is in the field of view regardless of whether it moves around or not.

This requires the library to have a reference image against which to do the moving points comparison. The reference image could be either:

  1. captured explicitly on request from the client app or
  2. the most recent image that did not trigger anomaly detection.

Option 1 would suit a production line environment where lighting is consistent Option 2 would suit an outdoor environment where lighting varies slowly through the day

Option 2 would require an additional moving point ratio to be set which would be the (lower) threshold below which the reference image can be replaced. Any images above the lower threshold but below the trigger threshold would be ignored. This lower threshold could potentially be learned during a training window feature where the maximum moving point ratio between images over a period of time is captured but that is probably a step too far for the library.

jksemple avatar May 07 '24 09:05 jksemple

Also see my pull request

jksemple avatar May 07 '24 12:05 jksemple