# Correntropy based Matched Filtering

**Abstract**

Introduce a nonlinear extension to the matched filter using a new metric called correntropy which features high order moments in the decision statistic showing improvements in classification especially in the presence of noise. Correlation and MSE are second order statistics which fully quantify random variables that are Gaussian distributed. Correntropy generalizes correlation; it quantifies higher order moments of the PDF yielding solutions that are more accurate in non-Gaussian and nonlinear signal processing. This is important when there is high noise level in the data, the object contours may have partially occluded areas, or the boundaries may not have been extracted correctly (as is the case with our data).

**Correntropy**

Correntropy is a generalized correlation measure involving high-order statistics which measures a nonlinear similarity between random variables [1]. In this work, correntropy is useful because it is directly related to the probability of how similar two random variables are in a neighborhood of the joint space controlled by the kernel bandwidth. Controlling the kernel bandwidth allows us to adjust the ‘observation window’ in which similarity is assessed resulting in an effective mechanism to eliminate the detrimental effect of outliers; thus, making this technique robust against impulsive noise, which may occur in the form of occlusions or other imperfections on the images.

Cross correntropy between two random variables and is defined as , where can be any non-negative definite kernel. In our case, the Gaussian kernel is used: . In practice, the joint PDF is unknown and only a finite number of data are available, leading to the sample estimator of correntropy .

**Point Matching using Correntropy**

Here, we describe the matching problem using correntropy and explain the transformation matrix to the most fundamental affine operations: rotation, scale, and translation. Focusing on the attributes of these operations helps us constrain the transformation matrix space, and in doing so, speed up the convergence rate. So, we consider the object of interest as a rotated, scaled and translated version of one of the existing patterns. Through a fixed number of parameter updates, given we can identify if the pattern is present. The parameters are updated based on maximizing the correntropy between the object of interest and the ‘transformed’ pattern using as a cost function

, where

is the rotation and scaling matrix, and and are the column entries of and respectively. To update the matrix , we take into consideration the repetition of the elements and and differentiate with respect to the vector instead resulting in the following fixed point update rule:

, with ,

where and are the components of the and respectively. Similarly by differentiating with respect to and equating the gradient to zero we get the update rule for :

.

Considering the transformation matrix as rotation + scaling is important in applications dealing primarily with rigid transformation, such as industrial inspection. Differentiating with respect to the vector constrains the possible transformations that an object could take to the ones specific to the application and both improves accuracy and speeds the convergence rate. To demonstrate the benefits of restricted transformation to application specific requirements, below we provide an example of how template matching is modified to the requirements of a real world application.

**Application: Side-scan Sonar Imagery Retrieval**

Improvements in sonar technology have allowed for large portions of the sea bottom to be scanned quickly. Nevertheless, identifying and classifying objects lying on the sea-bed is still a daunting task for a human operator. Special interest is shown in automating these techniques. During the survey of the sea bottom, the sensor(s) may detect the same object multiple times due to overlapping tracks – the zig-zag nature of the surveys. Thus, over the full course, the same object may be detected many times resulting in numerous observations that need to be fused into a single target location label.

The original sonar images have already been segmented into snippets containing an object highlight and its shadow, which arise from the presence or lack of acoustic reverberations, along with some of the background. The images belonging to one of the four categories: cube, cylinder, cone, and rectangular cuboid. They are taken in a range of 10 to 106 meters, and aspect angle of 0 to 360 degrees. The figure below shows four different example of the same object viewed from different angle and range.

Simple template matching techniques do not work in this scenario. Extracting the contours of the object highlight and shadow from different snippets and matching them is not feasible. There are no affine transformations that could match the shadow contours of two different snippets. This is due to the shadow being created from a 3D object whereas the contours are representations in 2D. To overcome this problem, we designed 3D models for each of the categories. The shadow contour was then generated by projecting the object onto the ground based on a point of view as depicted in the figure below. The point of view projection follows the actual synthesis of sonar images (synthesized one line at a time as the sonar fish follows the path). Similarly, we use a line rather than a single point as our projection viewpoint. Since a snippet contains information from both the object and its shadow, we use both sets of contours during the template matching.

The shadow contour matching is more difficult than highlight matching because in order to create the correct shadow shape we need to consider 3D object templates and project them into 2D based on a point of view representing the sonar sensor hitting the object. To simplify the problem, we consider separate cost functions for updating the rotation matrix and the point of view. To update the rotation/scaling matrix, the correntropy cost function is computed in terms of the shadow contour and the template projected shadow, which is a function of the point of view , template object , and the rotation/scaling matrix as shown below:

, where

has an additional row/column counting for the third dimension. The element represents the scaling factor in and . Again, differentiating with respect to the vector and equating the gradient to zero results in the following fixed point update rule:

, with .

The is updated using . To update the point of view, the cost function then becomes

, where

is the projection matrix, and and are the column entries of the shadow contour and object template respectively. Notice how the two vectors have different dimensions representing the two different spaces. In addition, the vector has a fourth dimension which is needed to homogenize the coordinates. The resulting fixed point update is:

, where .

**Experiments and Results**

Test the robustness of correntropy against noise by comparing it against correlation on an example of the object highlight with noise. The figure below shows the results of template matching using correlation (on the left) and correntropy (on the right). The template is shown in red, the object highlight along with noise is shown in blue circles, and the point correspondence in black. Correlation attempts to accommodate all the samples whereas correntropy works on a window size and ignores points that are distant (e.g. outliers).

Test the highlight and shadow template matching based on the improved 3D model. The figure below shows an example of a snippet where the object highlight and shadow contours are extracted (on the left) and the final 3D template matching (on the right).

The figure below shows the results of comparing an object against two templates: in (a) against the correct template and in (b) against a wrong template. The incorrect template deforms to adjust to the shadow shape but due to constraints in its shape, it can match well only on the sides resulting in poor match at the end. The poor match is also noticed on the highlight where to accommodate as much of the shape as possible the template rotates into a diagonal position, resulting in a suboptimal solution.

The tables below show the classification results of the entire database for both the highlight and the shadow template matching. It can be seen that the shadow matching improves the classification due to its consistency in preserving the object shape. However, both cases suffer in distinguishing between classes B and D. This is due to the similarity of these two classes; class B is the cylinder category and class D is the rectangular cuboid category.