how can i define more than 1 regfion of interest or several dead zones (trees), where object movement should not be detected. I know that i can define 1 ROI, but this is not enough for my application.
Apologies I must have missed this. You can perform a logical and with your image and a binary mask such that the regions you don't need are zeroed out and only motions from the required regions will be picked up. This code can be in your application before passing onto the library for detection.