Spearshot
Spearshot

Reputation: 11

Is it possible to use to use ssim to find differences between two images and create a 2d histogram that would map out the differences

I want to know if you could create a 2d histogram out of the ssim calculation between two images and have a visual representation of which pixels is different from each other. The color would change depending on how similar and different the images are.

I wanted to know if this is possible. All google searches has led me to believe that ssim is only used to find similarities and differences of two images as a whole but I would like to show more then that.

Upvotes: 1

Views: 173

Answers (1)

anatolyg
anatolyg

Reputation: 28300

Yes, this is possible. ssim is defined on a small block of pixels. There are many such blocks in an image. You can calculate ssim on each block and show the result as an image, where black represents "different" and white represents "similar".

Existing implementations then apply some sort of weighted average on this "image" to get a single number. But you could stop before that, and present the ssim image to do visual analysis.

The dimensions of the ssim image can be roughly 1/N of the original image if you divide it into non-overlapping blocks NxN. Or roughly the same dimensions as the original image, if you define blocks as neighbourhoods around each pixel. Or anything in-between, if you overlap your blocks.

Upvotes: 0

Related Questions