-
Frame/Image Comparison – Shared Pixel Finder
So I’d like to make a script that would compare multiple images (or frames of video) for shared identical pixels (perhaps with a slight tolerance). The pixels that aren’t identical in more than 1 frame would be masked out, and each masked frame would be layered on top of one another — resulting in an image of shared pixels only. Or, inversely, masking out the shared pixels for an image of just the differences.
Think of those “find the differences” picture puzzles:
This script would be able to look at multiple images/frames and create a composite image of only the common “background” pixels, or alternatively, the differences only. So you could have an image of only the differences between the above images, or an image without the added pieces.
My problem is I’m not sure where to start. I feel like this is similar to color keying, but since so many keying Plugins exist, I can’t find any explanation of how a script for keying would be built. How can I “snapshot” a frame (scan pixels and build an array?…) and compare that to another frame? Then I guess a second array of non-shared pixels would be somehow built into a mask?…
Anyone have any ideas?
.
