img.difference an ROI?

I’m trying to figure out a way to use the image.difference() method to only do the image subtraction on a particular ROI.

I’m able to save only an ROI

img.save("/temp.bmp", roi = [x0,y0,x1,y1], quality = 50)

… what would be the best way to do a image.difference() using that same ROI?
I can save off the old image easily enough (as seen above) … but how would I specify the ROI on the current image?

thanks!

Difference of ROIs is not implemented currently. That said, after the difference you can then just only process an ROI and not the whole image. So, just save and difference full images and then run the detection operation on an ROI.

You should open an issue on github (will tag it as a feature request) and it will get implemented eventually.