Side Scan Drawing Improvement

Chesapeake Times, Vol 4 | January 2021

This month some of CTI’s development resources have been focused on updating our Side Scan drawing routines to more accurately map samples to pixels in the display. These drawing routines and their accuracy become more important as users require higher and higher resolutions due to increasing accuracy of navigation, sonar equipment, and project requirements. Years ago placement of data had to be to the meter. Now we are looking at projects that require down to 10cm and sometimes lower.
What’s the Problem?
There are two main issues we have been focusing our efforts on. These issues are:

Along track ping to ping alignment also known as jitter. This is shown to the right, in an artificially constructed sonar data set with 0.2m along track lines (running vertically). The measurement shows the area between the lines. Note how the edges of the lines are not smooth. This uneven variation is the jitter.
We found this to be caused by aliasing of the data. Aliasing is the non perfect placement of pixels when converting data to pixels. This can best be described as jagged lines we used to see in video games and computer graphics. This concept is illustrated below by fitting a line to a grid. Note that the resulting pixelated line is not smooth. Sometimes the line is close to or falls on a pixel boundary. 
This can result in non-uniformity when parallel lines are drawn next to each other as shown in the Drawing Lines illustration. Note that the top line and the bottom line are parallel, however, the sample points fall into a different pixel pattern. This causes the top line to appear to have a larger gap in one section. This combined with Side Scan Sonar pings, which are mostly parallel and can vary with the across track positioning from ping to ping, adds to the error when drawing.
Another issue is an offset in the across track samples when subsampling to lower resolutions. This is illustrated in the image to the left, using a GeoTiff shown in the background with a semi-transparent mosaic overlay of a 1m x 1m square. Note the 0.43m offset. This is 1.7x the maximum offset of up to 1 pixel we should see from aliasing alone.
How Do We Improve?
In order to examine the problems in a controlled manner we created several artificial test XTF files that simulate sonar data with the different features that we need to test. These include a 1m x 1m cube, along track lines, and across track lines.
The test data allowed us to identify the areas of our code that need improvement.

We found that the ping to ping alignment/jitter is caused by small accumulative errors in converting our samples to pixels. This includes the placement of the pixel using the geolocation of the sample and the subsampling that figures out which sample is to be placed in a pixel.
We implemented an improved across track interpolation algorithm so that we can utilize fractional samples. This helps eliminate aliasing in the across track direction by effectively placing samples between pixels.

By improving our subsampling we also improved our across track offset when exporting the data to lower resolutions. In the screenshot to the right, we have improved the offset of our 1m x 1m cube when exported to a 25cm resolution GeoTIFF to less than 1 pixel.
In conclusion, we will continue working on new updates to our drawing routines to improve accuracy and image production so our user’s data is accurate and looks great. We will have these improvements to Side Scan drawing and mosaicking in the upcoming release of SonarWiz.

-Christopher Favreau, Chief Technology Officer