Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Well, a simple test is calculate the sum of the absolute difference between the masks. Then choose a threshold. If the difference between the masks is below the threshold, they are redundant.

For example, you might choose that at least 1% of the pixels must be different.

Alternatively, blur the difference image and see if all the differences are concentrated in one place. If it's just small differences, they should be scattered over the image, but if it's a real difference, it's likely in one place.

On the other hand, all of this only works if the cost of finding redundancies is less than the cost of just OR-ing them together. So if you can re-use this information over many sets of masks, that's good. ie: Mask 1 and 3 are always redundant. But if not, OR is very fast, much faster than this kind of processing.