How does a SSD algorithm work?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
lekha
Posts: 1
Joined: 2014-09-24T00:27:04-07:00
Authentication code: 6789

How does a SSD algorithm work?

Post by lekha »

How does a Sum of Squared Difference algorithm work when I want to compare two images and find a matching block?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How does a SSD algorithm work?

Post by fmw42 »

Did you try a Google Search. See http://en.wikipedia.org/wiki/Mean_squared_error and http://en.wikipedia.org/wiki/Template_matching

In IM, there are a number of metrics used to do a subsection search, including RMSE and MSE, which are normalized forms of the SSD. For each shift position of the small image every pixel in the small image is compared to the corresponding pixel in the large image subsection and SSD from all the pixels is computed. For each pixel, the sum of the differences of each color is computed and added together and the squared difference from all the pixels compared is totaled. The best match occurs where the SSD for that shift position is the smallest.
Post Reply