| Algorithm 2 Pseudo-code of rotation angle refinement matching | 
| 1: | Inputs: Test image I, size of template w × h, coordinate candidate (, ), angle | 
|  | candidates  scale candidates , angular resolution α, number of candidates | 
| 2: | Outputs: Correlation coefficient | 
| 3: | X index: idxXblockDim.x ∗ blockIdx.x + threadIdx.x   //Angular resolution | 
| 4: | Y index: idxYblockDim.y ∗ blockIdx.y + threadIdx.y   //Number of candidates | 
| 5: | if (idxX < ) and (idxY < ) then | 
| 6: | Angle
: 
[idxY]   //Refined angle | 
| 7: | Coordinate X: [idxY] | 
| 8: | Coordinate Y: 
[idxY] | 
| 9: | Scale s: s
[idxY] | 
| 10: | for
j in h
do | 
| 11: | for
i in w
do | 
| 12: | Collect intensity pixel values inside a search window using a bilinear interpolation approach with a center point at (x, y), 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 |