Detect motion on specific area

I want to detect a motion on a specific area from the whole frame so how can i add that code, anyone plz help or guide me at that area, i am a begineer on opencv

if it doesn’t work on Stack Overflow, chances are it will also not work in this forum.

show what you’ve done to figure your problem out.