Skip to main content
. 2020 May 11;20(9):2736. doi: 10.3390/s20092736
Algorithm 1 Pseudo-code of location refinement matching
1: Inputs: Test image I, size of template w × h, coordinate candidate (xCand1, yCand1), angle
candidates θCand1, scale candidates sCand1, pyramid level NP, number of candidates NCand1
2: Outputs: Correlation coefficient ηNCC
3: X index: idxXblockDim.xblockIdx.x + threadIdx.x   //Number of extension pixels
4: Y index: idxYblockDim.yblockIdx.y + threadIdx.y   //Number of candidates
5: if (idxX < 2NP) and (idxY < NCand1) then
6: Coordinate X: xRefined (idxX mod 2NP) + (xCand1 + 2NP)  //Refinement coordinate x
7: Coordinate Y: yRefined (idxY div 2NP) + (yCand1 + 2NP)  //Refinement coordinate y
8: Scale s: s sCand1[idxY]
9: Angle θ: θ θCand1[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
   (xRefined, yRefined), an orientation: θ, 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