Page 1 of 1

Detect when a person is there right now - how?

Posted: Fri Sep 08, 2023 3:28 am
by ZSasha
Hi guys,

I want to be able to detect if a person is standing behind or near my entry door and fire an (MQTT) event whey they are.
So basically as soon a person apperas in a particular area - BI sends out MQTT notification to my Home Assistant server and sends another one when the person is no longer there.
I have a feeling that that may be achievable with Static Object Analysis feature but I just not sure how.
I don't want to mess up with recordings etc - only MQTT notification when a person is there and when it is gone.

To make things a bit more complicated, I did make BI send MQTT notification when it detects a person in the whole camera view zone just using AI tab etc.
Now I need to distinguish between those two situations.
I could probably define another zone, close to my entrance door, so BI would send another MQTT notification when it sees a person in that zone but how to handle a situation when the person leaves?

Is this even possible? Any hints on how that could be achieved, please?

Thank you

Re: Detect when a person is there right now - how?

Posted: Fri Sep 08, 2023 6:41 am
by TimG
Maybe you could do the same as I do for my ALPR camera.

For that, it is a clone of an existing camera, then I set an area of interest which effectively digitally zooms in on the required area. You can then set specific zones and MQTT alerts for the clone camera.

Ifirc the only downside is that it doesn't work if sub-streams are enabled on that camera.

Perfection is the enemy of good enough :lol:

Re: Detect when a person is there right now - how?

Posted: Fri Sep 08, 2023 8:16 am
by ZSasha
Thanks TimG. But how do you handle situation when someone leaves that space? Or you are interested in only when someone comes there?

Right now I can use stand-alone script to capture images either from BI or from the camera directly, cut some part of it with imagemagic, send to my CodeProject.AI instance and depends on what it comes back with - do some action (like turning red light etc).
But if I could use BI for that - that would be great.

Re: Detect when a person is there right now - how?

Posted: Fri Sep 08, 2023 9:48 am
by TimG
The cloned camera with the reduced size AOI image can work directly with CPAI, so you can use alert and reset actions for the reduced area. No magic required.