Week 9: Solving bugs, adding smoothing features, and starting audio analysis!

May 07, 2021

Hello everyone, welcome to week 9 of my senior project. Continuing from the
progress last week, I have successfully fixed everything in my plugins. I also
added another two features in my plugin – average smoothing and Gaussian smoothing. I am starting my way on analyzing the results and prepare to wrap up my internship.

Fixing the error

From last week, it appears to me that the tracking produced by my plugin
‘CombineTrackWeighted’ isn’t fitting well with the scanned image. After
meeting with my on-site mentor and some developers who were also working on
Weaver, I learned how to find the source of the problem: By using features
such as break points, watching the variable and executing codes by line in
Visual Studio, I was able to look at the variables value that I was interested
in. Finally, I found the error that caused the tracking weird: when loading
three trackings, one of it wasn’t processed by the plugin ‘DEdgeGauss’ which
added new information to the track. The solution to my problem was then do the
trackings again.


In order to retrack, I have to pull out the original tracking of the scanned
image processed under the plugin ‘TrackDepthManual’, and then load the raw
track to the image derived from different filters. For each image (three in
total), I will then set a particular distance for the track to shift (7 for
green, -9 for blue, and -15 for red). Finally, I will process the track under
‘DEdgeGauss’ and save them.

Smoothing feature

This week, I finish another feature which pre-process the image before
changing it under other options. Smoothing is a way that prevents the weird
inconsistencies that make the audio not continuous. There are two main ways to
do the smoothing:

1. Taking averages of adjacent values
2. Gaussian blurring.

The following code is for method 1:

if (chkSmoothing.Checked)
// smoothing by taking averages
for(int i=0; i< track.Count; i++)
for (int j = 3; j < track[i].Count – 4; j++)
track[i][j] = (track[i][j – 1] + track[i][j + 1]) / 2;

Besides, Gaussian blur processes the data, tracking value in this scenario, on
a Gaussian function that is based on the Normal Distribution in Statistics. In
short, we time the tracking value in each track a particular value, and the
total values in a track have the sum 1.

The following code is for Gaussian smoothing.

else if (ChkSmoothing_Gaussian.Checked)
// Gaussian blurring
for(int i=0; i< track.Count; i++)
double sum = 0;
for (int j=2; j < track[i].Count – 3; j++)
sum += 1 / Math.Sqrt(2 * Math.PI) * Math.Pow(Math.E, -1*(j-1)*(j-1) / 2);
for(int j=2; j<track[i].Count-3; j++)
double weight = 1 / Math.Sqrt(2 * Math.PI) * Math.Pow(Math.E, -1*(j-1)*(j-1) / 2);
track[i][j] *= weight / sum;


The trackings work a lot better as they start to fit the scanned image.
(images will be added). Audios have been produced under different features,
and I am loading them into Sonic Visualizer for analysis. Basically, I need to
see how different audios volumes at same frequencies range compare to each

The following image showcases the tracks produced fitting the scanned image. The red and yellow curves are produced by the plugin I wrote under the outlier option.

Trackings produced under the outlier option

Next week

For the next week, I will start showing analysis of the audios, as well as
more details on the past development on Weaver as literature review. Stay

2 Replies to “Week 9: Solving bugs, adding smoothing features, and starting audio analysis!”

  1. Eric M. says:

    Developments look good!

  2. Sean P. says:

    Wow Leo! These developments look amazing! While very complex, I love seeing all the work and progress you are making.

Leave a Reply