| Algorithm 1 Pseudo-code of location refinement matching | 
| 1: | Inputs: Test image I, size of template w × h, coordinate candidate (, ), angle | 
|  | candidates  scale candidates , pyramid level , number of candidates | 
| 2: | Outputs: Correlation coefficient | 
| 3: | X index: idxXblockDim.x ∗ blockIdx.x + threadIdx.x   //Number of extension pixels | 
| 4: | Y index: idxYblockDim.y ∗ blockIdx.y + threadIdx.y   //Number of candidates | 
| 5: | if (idxX < ) and (idxY < ) then | 
| 6: | Coordinate X: (idxX
mod
) + ( + )  //Refinement coordinate x | 
| 7: | Coordinate Y:  (idxY
div
) + ( + )  //Refinement coordinate y | 
| 8: | Scale s: s
[idxY] | 
| 9: | Angle
: 
[idxY] | 
| 10: | for
j in h
do | 
| 11: | for
i in w
do | 
| 12: | Collect intensity pixel values inside a search window with a center point at | 
|  | (, ), an orientation: , and a scale: s | 
| 13: | end | 
| 14: | end | 
| 15: | Calculate the NCC score  between the template and the search windowend | 
| 16: | end | 
| 17: | Return |