Skip to content

Latest commit

 

History

History
55 lines (31 loc) · 1.26 KB

README.md

File metadata and controls

55 lines (31 loc) · 1.26 KB

video-reactive-lifx

python-3.7.3 logo

Controlling LIFX light bulb based on average colour of each video frame.

What does this do?

Find demo video of the project here.

Demo Video Link

Idea

Wanting to enhance the Video/TV Show/Movie viewing experience on a screen which is under a LIFX Light Bulb.

Methodology

Step 1: Capturing video screen frame by frame

Step 2: Processing image

  • resize
  • convert BGR to RGB colorspace
  • applying Gaussian Blur

Step 3: Calculating average colour of all pixels of the frame

Step 4: Converting RGB to HSBK/HSVK colour space and setting bulb colour using LifxLAN

Running script locally

Run script

python3 main.py

Running in dev mode with terminal output and realtime cv2 image windows

python3 main.py --dev

Credits

Capturing and processing video screen

https://github.com/Sentdex/pygta5

LifxLAN - High Level LIFX LAN Protocol Implementation

https://github.com/mclarkk/lifxlan

Other minor credits have been mentioned in the respective script files.