I have been using the bitwiseXor so far to calculate the differences between layers. Now i noticed that opencv have a AbsDiff which perform the absolute difference. I run a simple test and noticed that the output is the same as using the bitwiseXor on my case. But since they are different functions when to use and what are the benefits from using one or another? Beside the possibility of using a mask on the bitwiseXor… Which one got more performance?
PS: My images are all grayscale 8bit and i don’t require a mask
one is arithmetic. the other is operations on bits. they are not just different operations, the results are different for most values.
there is really no “choice” or “benefit” in which you “choose”. they have different purposes, in the sense that picking the other function will be mathematically wrong in most cases.
Thank you for clarifying, i wasn’t unable to spot the differences by eye, but i made a small script, in fact some values repeats and when not they are near but you are right.