Inspiration

Our team member had a WiZlight bulb and wanted to enhance his movie watching experience. The default application did not allow to use of a screen input to change colors. We decided to make an interface that allows users to choose a portion of the screen of their choice.

What it does

Python uses several modules in tandem to communicate with the ligthbulb and to monitor the user's screen, takes the average RGB values of 60 frames / 2 seconds and sends the RGB value to the lightbulb.

How we built it

We used several Python modules to run the program; PyAutoGUI to capture the screen, NumPy and OpenCV/CV2 for Image Processing and Time to measure the time, Threading to run multithreading, and Keyboard to record keystrokes.

Challenges we ran into

We made a poor decision in usage of our frontend. We started with Flask which doesn't support aysnc, an important feature for running UDP requests to interface with out lightbulbs. Furthermore, we had issues running processes at the same time, and the brightness of the bulb was initially consistent providing a poor rendition of the color it was expected to relay.

Accomplishments that we're proud of

Our screen capture is working perfectly. The program is able to send the average RGB values to the bulb every 2 seconds. The frontend and backend codes are working as they should on their own. We worked around the issues with running processes by utilizing threading. We modified code functions to accomodate brightness based on temperature (cold/warm) inference from the RGB values

What we learned

This was our first hackathon. We learned the utilization of openCV, quart and flask. We experiment with image processing first for a still image and a video then worked out the live stream. We did a lot of trial and error to achieve our expected goals.

What's next for WiZCaP

We plan on implementing a scratch-like environment in our frontend which allows users to use drag-and drop blocks to implement them to make their own patterns and effects.

Built With

Share this project:

Updates