96:
There are exactly three unique locations within the search image where the template may fit: the left side of the image, the center of the image, and the right side of the image. To calculate the SAD values, the absolute value of the difference between each corresponding pair of pixels is used: the
106:
For each of these three image patches, the 9 absolute differences are added together, giving SAD values of 20, 25, and 17, respectively. From these SAD values, it could be asserted that the right side of the search image is the most similar to the template image, because it has the lowest sum of
120:
The sum of absolute differences provides a simple way to automate the searching for objects inside an image, but may be unreliable due to the effects of contextual factors such as changes in lighting, color, viewing direction, size, or shape. The SAD may be used in conjunction with other object
149:. For example, SSE has packed sum of absolute differences instruction (PSADBW) specifically for this purpose. Once candidate blocks are found, the final refinement of the motion estimation process is often done with other slower but more accurate metrics, which better take into account
85:
This example uses the sum of absolute differences to identify which part of a search image is most similar to a template image. In this example, the template image is 3 by 3 pixels in size, while the search image is 3 by 5 pixels in size. Each pixel is represented by a single
43:
in the original block and the corresponding pixel in the block being used for comparison. These differences are summed to create a simple metric of block similarity, the
133:
SAD is an extremely fast metric due to its simplicity; it is effectively the simplest possible metric that takes into account every
100:
Calculating the values of the absolute differences for each pixel, for the three possible template locations, gives the following:
154:
194:
235:
137:
in a block. Therefore, it is very effective for a wide motion search of many different blocks. SAD is also easily
199:
162:
230:
158:
20:
141:
since it analyzes each pixel separately, making it easily implementable with such instructions as
240:
174:
142:
66:
93:
Template Search image 2 5 5 2 7 5 8 6 4 0 7 1 7 4 2 7 7 5 9 8 4 6 8 5
103:
Left Center Right 0 2 0 5 0 3 3 3 1 3 7 3 3 4 5 0 2 0 1 1 3 3 1 1 1 3 4
8:
184:
62:
36:
179:
138:
58:
51:
189:
74:
70:
214:
H.264 and MPEG-4 Video
Compression: Video Coding for Next-generation Multimedia
122:
57:
The sum of absolute differences may be used for a variety of purposes, such as
224:
150:
97:
difference between 2 and 2 is 0, 4 and 1 is 3, 7 and 8 is 1, and so forth.
32:
44:
87:
134:
107:
absolute differences as compared to the other two locations.
40:
146:
222:
211:
31:) is a measure of the similarity between image
110:
125:, to improve the reliability of results.
216:. Chichester: John Wiley & Sons Ltd.
155:sum of absolute transformed differences
223:
115:
195:Object recognition (computer vision)
128:
13:
35:. It is calculated by taking the
14:
252:
16:Digital image processing measure
212:E. G. Richardson, Iain (2003).
1:
205:
121:recognition methods, such as
200:Rate-distortion optimization
163:rate-distortion optimization
7:
168:
111:Comparison to other metrics
50:of the difference image or
25:sum of absolute differences
10:
257:
159:sum of squared differences
80:
54:between two image blocks.
236:Signal processing metrics
21:digital image processing
175:Computer stereo vision
153:. These include the
61:, the generation of
185:Motion compensation
37:absolute difference
180:Hadamard transform
116:Object recognition
59:object recognition
52:Manhattan distance
231:Video compression
190:Motion estimation
129:Video compression
75:video compression
71:motion estimation
248:
217:
151:human perception
256:
255:
251:
250:
249:
247:
246:
245:
221:
220:
208:
171:
131:
118:
113:
104:
94:
83:
17:
12:
11:
5:
254:
244:
243:
241:Loss functions
238:
233:
219:
218:
207:
204:
203:
202:
197:
192:
187:
182:
177:
170:
167:
139:parallelizable
130:
127:
123:edge detection
117:
114:
112:
109:
102:
92:
82:
79:
63:disparity maps
15:
9:
6:
4:
3:
2:
253:
242:
239:
237:
234:
232:
229:
228:
226:
215:
210:
209:
201:
198:
196:
193:
191:
188:
186:
183:
181:
178:
176:
173:
172:
166:
164:
160:
156:
152:
148:
144:
140:
136:
126:
124:
108:
101:
98:
91:
90:from 0 to 9.
89:
78:
76:
72:
68:
64:
60:
55:
53:
49:
47:
42:
39:between each
38:
34:
30:
26:
22:
213:
157:(SATD), the
132:
119:
105:
99:
95:
84:
69:images, and
56:
45:
28:
24:
18:
161:(SSD), and
225:Categories
206:References
169:See also
147:x86 SSE2
143:ARM NEON
88:integer
81:Example
67:stereo
33:blocks
23:, the
135:pixel
41:pixel
73:for
65:for
48:norm
145:or
29:SAD
19:In
227::
165:.
77:.
46:L
27:(
Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.