image-comparison-tool

Compare two images using SSIM and highlight visual differences.

86|18|Updated Dec 14, 2025
One-click install
npx skills add https://github.com/dkyazzentwatwa/chatgpt-skills --skill image-comparison-tool
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: image-comparison-tool
Source: https://github.com/dkyazzentwatwa/chatgpt-skills/tree/main/image-comparison-tool
Command: npx skills add https://github.com/dkyazzentwatwa/chatgpt-skills --skill image-comparison-tool

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires opencv-python, scikit-image, pillow, numpy, matplotlib, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the process of comparing two images, identifying differences, and quantifying their similarity.

Core Features & Use Cases

  • SSIM Similarity Scoring: Provides a quantitative measure of how structurally similar two images are.
  • Difference Highlighting: Generates a visual representation of the differing pixels between images.
  • Side-by-Side Visualization: Creates a combined image showing the original images next to each other with the differences highlighted.
  • Use Case: Developers can use this to automatically check if a UI element has changed between two versions of a webpage screenshot, or for quality assurance in image processing pipelines.

Quick Start

Compare the images 'before.jpg' and 'after.jpg' and save the output to 'diff.png'.

Frequently Asked Questions about image-comparison-tool

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compare two images using SSIM to detect visual regression?

You compare two images using SSIM by loading them with Pillow, processing the pixel arrays with NumPy, and calculating the Structural Similarity Index via scikit-image to generate a similarity score and a visual difference map.

What does SSIM measure when checking for differences between image files?

SSIM measures the structural similarity between two images to quantify perceptual changes, capturing structural degradation rather than absolute pixel differences to provide a more accurate visual difference detection score.

Can I use OpenCV and scikit-image for automated quality assurance in image processing?

Yes, you can use OpenCV and scikit-image for automated quality assurance in image processing. They provide the necessary functions to load graphical assets, calculate SSIM scores, and detect visual regressions in automated pipelines.

How do I highlight differing pixels in a side-by-side visualization of two screenshots?

To highlight differing pixels in a side-by-side visualization, you calculate the difference mask using scikit-image, apply it to the original images with OpenCV, and render the combined output plot using Matplotlib.

Do I need NumPy and Matplotlib to generate an image difference map?

Yes, you need NumPy and Matplotlib to generate an image difference map. NumPy handles the array operations for difference detection, while Matplotlib creates the side-by-side visualization highlighting the visual regression.

When should I use SSIM over basic pixel comparison for difference detection?

You should use SSIM over basic pixel comparison for difference detection when you need to measure perceived structural changes rather than absolute pixel value differences, making it better suited for visual regression testing.