top of page
  • Twitter Social Icon
  • LinkedIn Social Icon
  • Facebook Social Icon
Search

Week 8 Journal

  • Writer: Meena
    Meena
  • May 7, 2020
  • 2 min read

The focus of this week was to debug the ICA algorithm and get an initial heart rate reading.

For this week, I focused mainly on debugging a small helper function (calculate_new_w) and the ICA function - which depends on all the helper functions we debugged last week. In addition, we found a couple more missing functions from OpenMV's libraries that we needed, so I coded a sum function to add up all the values of a matrix, and a function that would take the highest value of the matrix and divide it by every element in the matrix so that all the values are within the range [0, 1].

While we were testing these functions, we ran into a huge problem with memory allocation. Because there were a lot of matrix multiplication operations and nested for loops, we found that we ran out of memory very quickly. For this reason, we went through every function we coded and deleted the variables (especially the 2D matrices) after they were used. After doing all of this, the program was unreliable - sometimes the algorithm would not have a memory issue and sometimes it would. To fix this, we split our code into 2 python files. One file contains the code to read a 10-second video and form the RGB channel matrix. The other file contains the helper functions for the ICA algorithm, along with the ICA function and DFT function. The first file will then call the second file for the ICA algorithm. By separating these two pieces of code, we were able to resolve our memory errors.

After debugging the ICA algorithm, we were able to get the source signal from our raw data. However, this needs to be debugged further because the result for the red channel is a few orders of magnitude higher than the result for the green and blue channel. In addition, we took the DFT of the green channel and the preliminary heart rate reading we got had 2 peaks, both of which were incorrect (~24 bpm & ~216 bpm).

Our milestone for week 7 was to get a heart rate reading, which we have reached. However, we still have a long way to go - we need to focus on getting a more precise heart rate. The first steps towards this goal are to make sure the ICA algorithm is doing what it is supposed to be doing. Then, we can try using different filters and different regions of interest when extracting the RGB colors.

 
 
 

Recent Posts

See All
Week 12 Journal

This week, Jennifer and I focused on collected data. First, we tested the accuracy between different amounts of face detection (using...

 
 
 
Week 11 Journal

The main focus of this week was to add improvements to the heart rate detection algorithm, and work on a couple stretch goals. During our...

 
 
 

Comments


© 2023 by Talking Business.  Proudly created with Wix.com

bottom of page