Ffmpeg motion detection for specific area

I am wondering is there anyway that I can set certain area in the video for motion detection? movement outside this area will not trigger the sensor.

The reason is top half of my video is public area and bottom half is my property. I need the top half because I want to check who is at the gate sometimes but I don’t want anyone who walked pass my property to trigger the sensor. I only want the sensor to trigger when someone trespass into my property.