Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Frame/Image Comparison – Shared Pixel Finder

  • Frame/Image Comparison – Shared Pixel Finder

    Posted by Royce Jacobs on October 13, 2015 at 5:07 pm

    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?

    .

    Kalleheikki Kannisto replied 10 years, 7 months ago 3 Members · 2 Replies
  • 2 Replies
  • Kevin Camp

    October 13, 2015 at 10:43 pm

    there is a keying effect called difference matte, that keys out like pixels between two images. it has controls for tolerance, matching softness.

    that might get you close to what you are trying to achieve.

    Kevin Camp
    Art Director
    KCPQ, KZJO & KRCW

  • Kalleheikki Kannisto

    October 14, 2015 at 8:31 am

    Placing the frames on separate layers and using the Difference blending mode to blend them will also give the pixels that are different between the frames. You will likely have to add a Levels adjustment to emphasize the results.

    That works as long as the camera is perfectly still. Even small camera shake between the frames will show up as edges. In such case you can get rid of the extra edges with the Minimax effect to a degree.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy