This project is still a work in progress but I would like to share with you the progress I have made so far, the direction I want to follow and gather some feedback or advice about it.
I wanted to build an ambilight system for my TV but the problem I ran into was that I was and still am using only an ethernet cable to get my video feed. So I couldn’t use those solutions you can find online using the HDMI, USB or VGA feed.
For those who don’t know what an ambilight system is, here is a link to a corresponding wikipedia page:
To overcome that problem, I got an idea to obtain that feed through a camera and use that as my source to detect the colors of my LEDs.
For this, I will connect a camera (RPI04V2) to a Raspberry PI 3 B+ running a processing sketch. That sketch will have the role to read the feed form the camera and figure out the color of the LEDs for the current image. Then those information will be sent by bluetooth to an arduino connected to the LED.
Now, I am not completely sure it will work because of 3 main factors :
- the delay that will be introduced between the moment the image is displayed and the moment the LEDs get the information. I have done some tests already and I think it will be ok for normal scenes but maybe a bit slow for action scenes.
- The quality of the feed : because it is a camera, some darker and brighter zones appear on the image and it can affect the color of the LED. I have already thought about some ways how to tackle this issue and ran some positive tests but it still needs a bit more work
- The camera parameters : I’m afraid that when the image becomes brighter the camera will adapt its sensitivity to show a darker picture and the other way around for a dark image. I haven’t worked on that one yet.
You can find the current version in this github repository:
What is already done:
- Display the list of the available cameras and select the one of interest
- Detect the TV screen position by displaying a unique color on the TV screen
- Straighten the image of the TV
What needs to be done:
- Apply the color correction to the image
- Make it work on the raspberry PI
- Get the LEDs color
- Send the information to the arduino via bluetooth
- Build the LEDs panel
- Write the arduino code
If you have any idea on how to improve it or if you want me to explain in a bit more in detail how some algorithms work, feel free to post a new message