Skip to main content
. 2020 May 11;20(9):2736. doi: 10.3390/s20092736
Algorithm 2 Pseudo-code of rotation angle refinement matching
1: Inputs: Test image I, size of template w × h, coordinate candidate (xCand2, yCand2), angle
candidates θCand2, scale candidates sCand2, angular resolution α, number of candidates NCand2
2: Outputs: Correlation coefficient ηNCC
3: X index: idxXblockDim.xblockIdx.x + threadIdx.x   //Angular resolution
4: Y index: idxYblockDim.yblockIdx.y + threadIdx.y   //Number of candidates
5: if (idxX < α10) and (idxY < NCand2) then
6: Angle θ: θRefined (idxX / 10.0)+θCand2[idxY]   //Refined angle
7: Coordinate X: xxCand2[idxY]
8: Coordinate Y: y yCand2[idxY]
9: Scale s: s sCand2[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: θRefined, and a scale: s
13:   end
14: end
15:  Calculate the NCC score ηNCC between the template and the search windowend
16: end
17: ReturnηNCC