show: all  february  march  april  may
week 11apr 16, 2025This week, I improved how the website uses Web Workers and I added a testing function for webcam processing. Web Workers use a message system to communicate between the main thread and their background thread. As blobs come in, Web Workers read and process them. I was concerned that if Web Workers fall behind, they will never catch up because they process messages in order, leading to a laggy blob stream. Instead, I want them to process the most recent message that they receive, even if that means skipping some blobs. I added a data structure that tracks if Web Workers are busy processing a blob and a data structure to store the latest blob from the WebSocket server. I then changed the message system so that blobs aren't sent to the Web Workers unless they aren’t busy. If they are busy, the blob instead is stored as the latest blob, so that when the Web Worker frees up again, it can just grab the latest blob to process. I didn’t detect any immediate changes in the processing speed when I tested this feature, but I hope that it will have some impact as I scale up Blobby.
The other testing function I added is for the webcam processing algorithm. I need a way to test out my blobbification algorithm without having to run the website and wave my hands in front of the screen. I also want to be able to easily see how changes in the algorithm affect how the final blobs looked. Thus, I added a new function called test_blobbify to my Webcam class. test_blobbify quickly runs the blobbification algorithm on a set of ten input images and then saves the resulting blobs to an output folder.  This function will be very useful when I need to fine-tune the algorithm, because I can quickly make changes and see how the shape of the blobs are affected. I am excited to use it in the coming weeks!


©Aditi Gupta
New York University
Integrated Design & Media (IDM) Graduate Thesis