## 3 Automatic Feature-Based Approach
### Feature Matching  
The proposed minimization algorithm allows a contour to converge, in an iterative way, on an area of high magnitude image energy; in this case, edges. Convergence is performed separately for each object and so is the initialization strategy. Contours are initialized by aligning the gravity centers of each validated region in the reference image and of the corresponding object in the sensed image. The center of gravity of a given object F\({}_{\text{k}}\)(i,j) (_k-th_ object of a binary image F) is estimated using objects moments [22],  
Figure 3: **(a), (b)** Multitemporal NOAA-AVHRR images; **(c), (d)** cloud overlays; **(e)** coastline extracted from reference image (blue contour) and, **(f)** smoothed gradient energy map of reliable areas extracted from sensed image. _Algorithms_**2009**, 2**  
\[\vec{X}_{F_{k}}=\frac{\sum_{i}\sum_{j}j\cdot F_{k}(i,j)}{m_{00}}\,;\,\vec{Y}_{F_{k} }=\frac{\sum_{i}\sum_{j}i\cdot F_{k}(i,j)}{m_{00}} \tag{4}\]  
where m\({}_{00}\) represents the binary object area (zero-order moment). After contour initialization, each object is handled separately. Given a reference image with \(m\) objects, let us analyze the optimization of an object \(i\) (e.g. an island) whose contour has \(n_{i}\) points. Let \(\boldsymbol{V}_{i}^{(k)}=\{\,\
u_{i\,j}^{(k)}\mid j=l,2,...,n_{i}\}\) be the contour of the \(i\)-\(th\) object after the \(k\)-\(th\) iteration. Its total energy is,  
\[E_{\text{\tiny contour}_{i}}^{(k)}=E_{\text{\tiny contour}}(\boldsymbol{V}_{i }^{(k)})=\sum_{j=1}^{n_{i}}E_{\text{\tiny edge}}(\
u_{i\,j}^{(k)}) \tag{5}\]  
where \(E_{\text{\tiny edge}}(\cdot)\) is the energy of one point of the contour evaluated over the gradients energy map (see equation 2). The algorithm allows uniform translations \(\text{d}=\{\text{d}_{x},\text{d}_{y}\}\) in a neighborhood (typically, 5\(\times\)5 pixels) centered at the current position. Every site in this neighborhood is a candidate point for updating. The algorithm moves \(\boldsymbol{V}_{i}^{(k)}\) to a new location \(\boldsymbol{V}_{i}^{(k+1)}\) according to the following updating rule,  
\[\boldsymbol{V}_{i}^{(k+1)}=arg\,min_{\text{d}}E_{\text{\tiny contour}}( \boldsymbol{V}_{i}^{(k)}) \tag{6}\]  
That is, at each iteration, an exhaustive search is carried out, looking for the reference contour position leading to the minimum energy. The process is iterated reducing, at each iteration, the search window size. When two successive iterations lead to the same minimum energy the process ends. This process is performed for all validated reference objects. The minimization algorithm steps are presented next. **Algorithm: Local Energy Minimization**  
Step 1 - Based on the contours initialization, the \(m\) contours in the reference image are identified, sorted, divided (if required) and denoted as \(\{C_{l},\,C_{2},\,...,\,C_{m}\}\). Additionally, the initialization label will be obtained. Step 2 - Computation and saving of the initial energy of each of the contours using Equation (5). Step 3 - Computation of the size of the initial search window \(W\) and smoothing the gradients energy map (Eq. 2). Step 4 - For a given contour \(C_{i}\)  
(a) Find a position of lower energy within the window \(W\), applying the updating rule of Eq. (6). (b) If there is a position of lower energy:  
1) Update the contour to its new position. 2) Save the new value of energy. 3) Reduce the size of the search window centered at the new position of the contour, the degree of smoothing and the amplitude of the Gaussian function and return to step 4 (a). (c) If a position of lower energy is not found:  
1) Determine the number of matched points. 2) Save the coordinates of all points of the contour obtained. Step 5 - Repeat steps 3-4 for a new contour. The implemented exhaustive search algorithm is based on dynamic programming techniques [24], showing its flowchart in Figure 4.  
To improve the estimation robustness, all final reference contours must pass a local consistency test.