Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This macro is partially based on Steve Wright's great book: Digital Compositing for Film and Video.
The Difference Matte simply tells you the difference between two images as a grayscale image. For improving the raw matte quality I used the color distance method, therefore it's slower but produces much better results than a simple monochrome operation.
The offset mask mode enables you to see even the smallest differences between two images. Non-equal pixels will show up as dark gray "valleys" or light gray "hills", which gives the image an embossed look if there are any differences, and a "flat" look (50% gray) if there aren't.
The edge detection mode is an intuitive tool for lining up two images. Red outline represents input 1, and blue represents input 2. You can easily see the direction in which you have to move the "blue" input (red means "stop"). Finally, if the two images are exactly overlapped, the outline turns green (see example). (Of course, the difference between them won't turn green.)