Week 7 Journal
- Meena
- Apr 30, 2020
- 2 min read
This week, our main goal was to get the ICA algorithm working. Since most of this was written in Google Colab, we had to transfer it to OpenMV's IDE and make sure our syntax was right, and the functions we were using existed. Unfortunately, we ran into a lot of bumps along the way, but we are about halfway through debugging the algorithm.
One of the main portions of the algorithm is a covariance function, which does not exist in the OpenMV library. For this purpose, I coded a covariance function a couple weeks ago. However, it was not done correctly, because the output has to be a square matrix because we need to take the eigenvalues and eigenvectors from this matrix. Following a different website, I recoded the covariance function - hopefully it works better than the old one.
While debugging some of Jen's code, we found out that there were a couple of functions that did not exist in OpenMV that were necessary for ICA. I coded a function called norm, which found the L2 norm of a 1D array. While there were magnitude functions in the OpenMV IDE, they only took the magnitude of line, circle, and rectangle objects, not arrays or matrices. Another function that I coded from scratch was for matrix vector multiplication. We found that the library we downloaded from GitHub for matrices did have a multiplication operator, but seemed to be for element-wise multiplication, not matrix multiplication.
Next week, I will send the OpenMV to Jen so she can code on the IDE for the remainder of the quarter. Hopefully, by the end of next week, we will be able to implement the ICA algorithm. Since the DFT algorithm is now working, we might be able to get a preliminary heart rate from a video.
Comments