What are some approaches to do this? Can we use OpenCV to do that? Any ideas?
The scene is static. Somewhere I saw a user trains the app with multiple images of normal scenes, and the app monitors the amount of pixel change from the trained images. And it issues an alarm when the amount of pixel change exceeds a threshold for a specified time period. But it shouldsn’t be that simple. A human may walk around or shadows and sunlight shouldn’t be a scene change and thus, will not be an anomaly.
@t.jasmin111 these two posts are not addressed to you or your question.
@berak I’ve dealt with the issue. the system flagged several of that user’s posts, which frequently contained youtube links and links to the same thread on some other forum. this post here may be useful (i’ve restored it) but the general contributions were a chore to read.
Ok. But do we have any pre-trained models for that? Altenratively, are there any general object detection model that can detect ANY objects? I can use it to understand what object is missing/added later.
Use Canny Edge Detection for the “good state” template and a difference sample - a door and the cross hatch will have detectable edges, generally no matter the lighting or time of day.
Some video motion detection (optical flow?) can filter out when you “test” for the expected edges - a time-out would reduce false alarms, for example 1-2 minutes (adjustable) of “no motion” in the ROI before testing for the edges should eliminate people standing in your detection zone. You can take a dense optical flow evaluation of the video to create a map of motion in the frame and then also apply Canny Edge Detection to the resultant output of the optical flow process to create some boundaries on moving objects in the video frame - correlation between edges in the original image and edges from the optical flow motion detection give a fairly high probability of that being a solid object - one can then use that resultant solid object for other interesting things like video tripwires, and all kinds of useful things for security/safety purposes.
Item abandoned, item taken, entering or exiting a space (and counting), and on and on.