Thursday, April 7, 2016

Presentation 5 Link

Presentation 5

Presentation 4 Link

Presentation 4

Presentation 3 Link

Presentation 3

Plan to Fix Call Stack Error

  • Array blobs[]           
  • Array goodPixels[]    //the white pixels that were marked during thresholding
  • for (goodPixel in goodPixels) {
    • if (there aren’t any blobs with goodPixel) {
      • Array links[]
      • Array news[]
      • news.append(goodPixel)
      • while (news.length > 0) {
        • int num = news.length
        • for (int index = num-1; index > -1; index--) {
          • checkForNewLinks(news[index])      
          • links.append(news[index])  
          • news.remove(news[index])  
        • }
      • }
      • blobs.append(new Blob(links)) 
    • }
  • }

Wednesday, April 6, 2016

Issues as of 4/5/16

Though I edited the program to find a line on the floor and hover over it, and I’m fairly certain everything I wrote makes logical sense, the drone still behaves in weird ways. There are two main problems we are having with controlling the drone:

  1. It drifts off course even when its image processing seems to be precise.
  2. It has been returning an error that reads: “maximum call stack size exceeded” almost every run now.
What I’ve learned is that, to address the second issue, node only allows a certain number of function calls in a single step. This is to prevent a system from locking into an endless function and crashing.

My current image processing method uses recursion to group image pixels into different blobs after thresholding, and this method is the one that has been returning the call stack error. Therefore, I believe I have to change this function to avoid using recursion (the blob grouping function currently, when creating a blob, calls itself hundreds of times before allowing the program to continue).

My current goal, in conclusion, is to create a new findBlobs() function that avoids the use of recursion.

As to the first problem, I still don’t know how we’re going to fix it, so I’m open to suggestions.