I'm currently doing a project based on the methodology described in this paper: Camera calibration from a single night sky image
As a beginner in computer vision, I do not quite understand how I can implement the method used in the paper to find the centre of all the bright spots (luminaries) within an image, particular on the paragraph in section 4.1:
The surrounding patch of size 15 × 15 pixels (Figure 1(a)), is upsampled by a given factor (Figure 1(c)) and the corresponding gradient map is calculated (Figure 1(d)). Starting from the brightest region, the gray value threshold is decreased, until an energy function is maximized. The energy function is defined as the sum of the border gradients and normalized by the border length (Figure 1(e)). This leads to a segmented star image shown in Figure 1(f). The segmentation ensures that the weighted centre of gravity algorithm [11] gives a robust estimation.
From my understanding, I think I can do a Laplacian / Sobel gradient function on the upsampled image, but after that I'm not too sure how I can perform the energy function part and produce the segmented image. Also I would also want to understand how implement the weighted centre of gravity algorithm to find the centre of the bright spot using openCV or other python library.
Much appreciated if any of you can provide some lights on this.
Thanks and regards.