show: all  february  march  april  may
week 07mar 12, 2025This week I worked on the networking side of the project to figure out how to get multiple webcams to communicate with one webpage. From the start, I had an assumption that IP webcams is the way to do this so that the webcam processing load can be separated from the actual webpage. I ended up contacting a few IDM faculty members to ask whether we had IP webcams on hand that I could borrow and also if there was anyone that had expertise in the area. Prof. Todd Bryant had around ten or so IP webcams at the Navy Yard that he himself had not tried but was willing to let me take a shot with. It proved pretty difficult. These IP cameras were the FLIR BlackFly Color Cameras and required a setup that was more than just plugging them all together in a single ecosystem. The native FLIR PySpin library can be pretty tough to work with, which is why there are a bunch of wrappers—like simple_pyspin and EasyPySpin—designed to make camera setup a little less painful. We tried both to get the cameras up and running with the goal of streaming video into OpenCV. 

That said, we didn’t get far enough into the setup to actually test them out—and honestly, we kind of knew from the start that it might not be worth the effort. Blobby doesn’t need high image quality, and we don’t have the processing power to handle those camera streams anyway. We ended the day with a sentiment of having given it a good try and realized just how much easier using standard plug in webcams could be. It might potentially require more than one computer to use six of them at once, but even that set up would be easier than trying to configure six IP ones.
After realizing that several local webcams is feasible, I began working on refactoring the code to allow for multiple webcams. I created a class called WebcamController, which creates a Webcam class for each webcam, and manages them. The WebcamController uses threading to ensure that all the Webcam‘s get approximately the same amount of computing time. To test out my code, I built out the WebSocket server logic.

I created a separate JavaScript file for the WebSocket server. The actual code was relatively simple. The server takes in messages from the Python WebcamController class, and then forwards them to the blobby website. On the Python side, there’s a websocket package that I used to connect to the server. On the website side, I was able to connect to WebSocket using in-built commands. After validating that the connection was working, I set up the actual messages. I formatted the messages from the WebcamController to contain two main pieces of information. First, the index of the webcam it is reporting from, and second, a list of points that defines the shape of the blob. I then added a method inside the blobby server code to draw the shape of the curve, and fill it in. I connected two additional webcams to my laptop (so three in total), and tested out the code. Since I pointed all the webcams at myself, the blobs look like copies of each other, but they are actually three separate webcams reporting to the same webpage. Success!





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