top of page

Correlation Algorithm

 In this part, we will correlate the satellite image with the road map by using a correlation algorithm. The correlation algorithm can locate the satellite image in the road map.

Correlation Function

The correlation function is based on the definition of the correlation coefficient.

​

​

​

We use the Matlab built-in function normxcorr2 [1] to do the correlation. The function calculates the correlation value between two images in different coordinates. According to the correlation function, we can find the coordinate where the correlation value is the biggest. Based on this, we can locate the satellite image in the a road map.

Resize

 The pictures are stored in the MATLABin the form of matrices. The correlation function tries to calculate correlation coefficients between matrices. For a given feature to properly correlate, the pizel resolution must be the same in both the source and the target.  Here, we use the MATLAB command imresize [2] to resize the satellite image to an appropriate resolution.  This function uses bicubic interpolation to downsample.  We choose to downsample the satellite image as opposed to upsampling the road image to significantly reduce the amount of data we are using and decrease runtime.  Results are positive even though we discard the vast majority of the original pixels.

Apply the Function

To develop the correlation algorithm, we consider a smaller road region than the main driver will deal with and simply clip portions of the satellite image for analysis.  Firstly, we clip a small picture from the satellite image as Fig.1. The goal is to locate the target in the corresponding road map show in Fig.3 below. We can see the window we get on the road map is exactly the one we clip from the satellite image. So in this case, the target was located on the road map perfectly. Fig. 2 shows the correlation function.

Fig.1 The satellite image with a clip image from it

Fig.3 The road map with the result we got

Fig.2 The correlation function

 However, not every case is successful. Here is an example of a failure case below. The goal and the correlation function is the same as before, but the target cannot be located in the right place.

Fig.4 The satellite image with a clip image from it

Fig.5 The correlation function

Fig.6 The road map with the result we got

  Here are few reasons we list why this target cannot be located.

  1. Noise in the target makes bad effects on the correlation function.

  2. The scale of the clip image is too small so that the characters cannot be identified obviously from others.

  3.  The target has a periodic structure like somewhere else. This is shown in the many correlation peaks we can see in Fig. 5 suggesting that precise location within an area of consistent periodic structure is difficult.

Accuracy

To get the accuracy of this algorithm, test cases are needed. We tested 1000 random cases divided into 10 groups. In each test case, we clip a small image from the satellite image randomly and see if the algorithm can match it with the road map successfully. Fig.7 below shows results of the test.

Fig.7 The accuracy of the algorithm

References

References

Source Code

Source Code
bottom of page