rsmbl / Resemble.js

Image analysis and comparison

Home Page:http://rsmbl.github.io/Resemble.js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

algorithms or theories deployed in comparing the image?

anthonysiu2016 opened this issue · comments

Just find it useful and simple to deploy. But would like to know the algorithms or theories behind in comparing the image?

It iterates over every pixel in one image and then compares the RGBA values to the corresponding pixel in the other image. If the value difference is greater than a certain amount, it calculates the hue values of surrounding pixels in order to assess the likelihood that this particular pixel is affected by aliasing, if so the pixel is ignored; if not, the pixel is considered different and counted towards to the total percentage difference of the two images.

The RGBA value comparison is a standard way to compare images. The aliasing algorithm, I developed through trail-and-error.