Skip to content

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

License

Notifications You must be signed in to change notification settings

adityachandak287/video-reactive-lifx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages