Beiträge von Worfje

    Hi, I am fairly new to this forum and building my first complete setup.

    My complements to the team that made Hyperion/Hyperbian!

    I can't tell you how long I wanted to have 'ambilight', but without having to buy a Philips TV.


    But, back on the topic: I found a way to find the optimal setting of brightness/contrast/saturation/hue for any grabber available by exploiting a python script of a guy naming himself ciko. Great work man!

    You can find it here, but it won't work out of the box since skimage changes and also I had to alter the videframe buffer size.


    First you need to installing below packages:


    sudo apt-get update (optional, but was needed when I tried installing below)

    sudo apt-get install python3-skimage

    sudo apt-get install python3-opencv


    Next to this you need offer the grabber a 1920x1080 test image via its HMDI connection (lots of colors!).

    The same image must be available for the script itself (named 'artificial.png' in above python script).


    The script can now be executed by:

    python <name of the file of the script>


    The script will compare the image grabs for a random set values for brightness, contrast, saturation and hue.

    The top 10 will be build up and updated as you keep running the script (30 minutes / 1 hour, it just keeps narrows the range for the optimal settings).


    I ordered 6 'different' USB grabbers from Ali (which proved to all have been based on the MacroSilicon chip) and ran this script.

    An example top 10 (from best to worst, up to down):


    [brightness, contrast, saturation, hue, similarity score by SK Image library]

    [0, 130, 128, 1, 0.9790735862137337]

    [0, 130, 128, 1, 0.9790735862137337]

    [0, 130, 128, 1, 0.9790735862137337]

    [0, 131, 128, 1, 0.9785554986591819]

    [0, 131, 128, 2, 0.9779354215036543]

    [0, 129, 128, 3, 0.977378649197668]

    [0, 129, 128, 3, 0.977378649197668]

    [0, 129, 131, 3, 0.9773188600386898]

    [0, 129, 131, 3, 0.9773188600386898]

    [0, 131, 130, 2, 0.9772894482817124]

    [0, 129, 130, 2, 0.977280399322154]


    I tested all 6 USB grabbers I have and all ended up with above values for optimal similarity of images grabbed and offered via HDMI.


    brightness 0x00980900 (int) : min=-128 max=127 step=1 default=-11 value=0

    contrast 0x00980901 (int) : min=0 max=255 step=1 default=148 value=130

    saturation 0x00980902 (int) : min=0 max=255 step=1 default=180 value=128

    hue 0x00980903 (int) : min=-128 max=127 step=1 default=0 value=1


    It is remarkable that the defaults found in all 6 grabbers are very different to optimal...


    Maybe optimizing here isn't helping much in for the end result, since you may compensate for the unneeded grabber error by calibrating the leds vs the output of the TV. Still, it was a cool experiment and fun to do and there is less error now to be corrected!


    Next step is calibrating the colors of the LEDs vs. the output of the TV... with a camera... semi-automatic would be nice!

    Also, I am using the second HDMI output of my Denon receiver ('monitor 2') and succesfully used a grabber based on the MacroSilicon chip and it worked fine (without having to add a splitter).

    Hi, the HDMI can only be used as output on Raspberry Pi's.

    USB capture dongles (aka grabbers) can be used to input video data into the Raspberry.


    Keep in mind that HDMI is 'blessed' width HDCP, which can cause some headaches.

    Searching on the term splitter or loop might give some more insight.