For a project I am working on, I use frame differencing to separate the object from the background, this works perfectly fine, until I try to put a darker object into the frame.
With darker objects in frame differencing I would like to set the background to white, so the darker object is clearly visible and not almost the same color as the background. Is there a way for me to do something like this?
I tried inverting the image, but in all cases this inverts the placed object in the frame also, making everything white and leaving me with the same problem. After that I tried using a white mask, but couldn’t find where to implement it to get the results I would like to get.
If I am right frame differencing just compares the matrices of the 2 images and thus every part that is the same color, for example 205-205=0 and being a 0 is black? Or is this completely misunderstood? If we could get access to these matrices and convert all the 0’s to 1’s it’s done, but I don’t know if this is possible in Open MV?
I Also looked into “image.b_xor(image[, mask=None])” to possibly combine images to get the same results, but without an example I couldn’t figure out how to properly use this command. 3