1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Reduce highest brightness levels without touching lowest one...

Discussion in 'Hyperion General' started by propergol, 2 December 2016.

  1. propergol

    propergol New Member

    Messages:
    27
    Hardware:
    RPi3
    For now I am testing Hyperion on APA102 LED strip with a density of 133 LEDs/meter (maybe this density is the root of my issue)

    I have done some very small adjustment on the colors but they are nearly perfect and match my TV screen.

    The problem comes when screen is displaying a bright scene then the LEDs are way to much bright and illuminate the wole room :D

    Of course I could play with the brightness level in Hypercon and reduce it BUT then the issue is that in dark mid-dark scenes colors/brightness are clamped and LEDs simply turns OFF.

    I guess what I am for is a kind of non-linear brightness correction that would avoid ultra bright LED level while preserving low brightness one.
    Now the question is : is there any existing parameters I can play on that would help me?
    Or maybe by editing some config files?

    Thanks
     
  2. penfold42

    penfold42 Moderator Developer

    Messages:
    399
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
  3. propergol

    propergol New Member

    Messages:
    27
    Hardware:
    RPi3
    I did played with gamma, but I should not since it is affecting the wole range from 0 to 255.
    Anyway I ended with this parameters, that give relatively good results but also leads from time to time to strange color rendering.
    All color stock except
    gamma : 1.3 1.4 1.8
    luminance gain 0.5

    EDIT : maybe a solution would be to under-volt my 5V rail (of course not the data ;-) ).
    Not sure if I could do this ultra simple way, with a resistor, or go for more complex step down converter.
     
  4. redPanther

    redPanther Moderator Developer

    Messages:
    193
    Hardware:
    RPi1/Zero, RPi2, 32/64bit, +Arduino
    I implemented that feature in hyperion.ng
    See my pr https://github.com/hyperion-project/hyperion.ng/pull/359
    The brightness param is what you want. perhaps a value of 0.6 can fit.
    Also set gamma with values you figured out.9
    If you new to nextgen hyperion, prepare for changes, search forum for infos
     
    Last edited: 4 January 2017
    • Like Like x 1
  5. propergol

    propergol New Member

    Messages:
    27
    Hardware:
    RPi3
    Great!!! :omg:
     
  6. redPanther

    redPanther Moderator Developer

    Messages:
    193
    Hardware:
    RPi1/Zero, RPi2, 32/64bit, +Arduino
    The brightness val feels a bit strange, because it is linear atm, but should be none linear. Will change this asap. This means small changes above 0.5 seems to have no effect, but they have! Use mixed colors like white yellow to test.
     
  7. propergol

    propergol New Member

    Messages:
    27
    Hardware:
    RPi3
    I will try to test.
    Regarding this new version of Hyperion : for now do I need to compile something myself for the PI3 or is there any ready to use download location?
    Thanks
     
  8. redPanther

    redPanther Moderator Developer

    Messages:
    193
    Hardware:
    RPi1/Zero, RPi2, 32/64bit, +Arduino
    you have to compile yourself and you have to use my branch, because its not merged yet. there is also a compile howto file ...

    git clone https://github.com/redPanther/hyperion.ng.git
    cd hyperion.ng
    git checkout adjustmentMerge
     
  9. redPanther

    redPanther Moderator Developer

    Messages:
    193
    Hardware:
    RPi1/Zero, RPi2, 32/64bit, +Arduino
    I changed how input value is mapped. Now use brightness 0.5 for optimal balanced brightness. Then lower the value if you need it darker. Use white color as reference ..
     
  10. propergol

    propergol New Member

    Messages:
    27
    Hardware:
    RPi3
    I have just try to compile but I don't know if all went well since there is a warning regarding missing zlib.
    Also I started messing with PI and linux in september 2016 so I don't know a lot sorry :notworthy:
    An other point : in the readme there are 2 version with or without PWM, I dont know what version I should use.

    Anyway here is a test :


    osmc@osmc9:~/hyperion.ng$ cmake -DCMAKE_BUILD_TYPE=Release -DPLATFORM="rpi-pwm" -Wno-dev
    -- The C compiler identification is GNU 4.9.2
    -- The CXX compiler identification is GNU 4.9.2
    -- Check for working C compiler: /usr/bin/cc
    -- Check for working C compiler: /usr/bin/cc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- PLATFORM: rpi-pwm
    -- ENABLE_AMLOGIC = OFF
    -- ENABLE_DISPMANX = OFF
    -- ENABLE_FB = ON
    -- ENABLE_OSX = OFF
    -- ENABLE_SPIDEV = ON
    -- ENABLE_TINKERFORGE = ON
    -- ENABLE_V4L2 = ON
    -- ENABLE_WS281XPWM = OFF
    -- ENABLE_X11 = OFF
    -- ENABLE_TESTS = OFF
    -- ENABLE_PROFILER = OFF
    -- validate json files
    checked files: 49 success: 49 errors: 0
    -- validate json effect files
    checked effect files: 28 success: 28 errors: 0
    -- validate json file
    -- Current Version: adjustmentMerge (redpanther-7fcd5c3/4a6ab3d-1483644062)
    -- Performing Test COMPILER_SUPPORTS_CXX11
    -- Performing Test COMPILER_SUPPORTS_CXX11 - Success
    -- Performing Test COMPILER_SUPPORTS_CXX0X
    -- Performing Test COMPILER_SUPPORTS_CXX0X - Success
    -- Found Qt Version: 5.3.2
    -- Found libusb-1.0:
    -- - Includes: /usr/include/libusb-1.0
    -- - Libraries: /usr/lib/arm-linux-gnueabihf/libusb-1.0.so
    -- Looking for include file pthread.h
    -- Looking for include file pthread.h - found
    -- Looking for pthread_create
    -- Looking for pthread_create - not found
    -- Looking for pthread_create in pthreads
    -- Looking for pthread_create in pthreads - not found
    -- Looking for pthread_create in pthread
    -- Looking for pthread_create in pthread - found
    -- Found Threads: TRUE
    -- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
    -- Looking for dlfcn.h
    -- Looking for dlfcn.h - found
    -- Looking for inttypes.h
    -- Looking for inttypes.h - found
    -- Looking for memory.h
    -- Looking for memory.h - found
    -- Looking for stdint.h
    -- Looking for stdint.h - found
    -- Looking for stdlib.h
    -- Looking for stdlib.h - found
    -- Looking for strings.h
    -- Looking for strings.h - found
    -- Looking for string.h
    -- Looking for string.h - found
    -- Looking for sys/stat.h
    -- Looking for sys/stat.h - found
    -- Looking for sys/types.h
    -- Looking for sys/types.h - found
    -- Looking for unistd.h
    -- Looking for unistd.h - found
    -- Protobuf: doing try-compiles for hash map/set headers
    -- Protobuf: doing try-compiles for pthread test
    -- Looking for stddef.h
    -- Looking for stddef.h - found
    -- Using protobuf compiler: /home/osmc/hyperion.ng/bin//protoc
    -- Found PythonLibs: /usr/lib/arm-linux-gnueabihf/libpython2.7.so (found version "2.7.9")
    CMake Warning at doc/CMakeLists.txt:31 (message):
    Doxygen not found, unable to generate documenation!


    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/osmc/hyperion.ng
     
  11. propergol

    propergol New Member

    Messages:
    27
    Hardware:
    RPi3
    forget to say that I am trying on OSMC
     
  12. redPanther

    redPanther Moderator Developer

    Messages:
    193
    Hardware:
    RPi1/Zero, RPi2, 32/64bit, +Arduino
    Dont use platform flag, this is done automaticly. Delete build folder and start again. Did you try to run make afterwards?
    Btw my pr is merged you can use official hyperion.ng as said in compile howto.
     
  13. redPanther

    redPanther Moderator Developer

    Messages:
    193
    Hardware:
    RPi1/Zero, RPi2, 32/64bit, +Arduino
  14. propergol

    propergol New Member

    Messages:
    27
    Hardware:
    RPi3
    ok thanks.

    No I didnt try to "make", I did delete and start again but then I did get others errors :D

    I will follow the howto and let you know.
     
  15. propergol

    propergol New Member

    Messages:
    27
    Hardware:
    RPi3
    I have tried serval time but now, even with I get this errors at the end :
    ...
    CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
    Please set them or make sure they are set and tested correctly in the CMake files:
    BCM_INCLUDE_DIR
    used as include directory in directory /home/osmc/hyperion/libsrc/grabber/dispmanx
    used as include directory in directory /home/osmc/hyperion/src/hyperion-dispmanx

    -- Configuring incomplete, errors occurred!
    See also "/home/osmc/hyperion/build/CMakeFiles/CMakeOutput.log".
    See also "/home/osmc/hyperion/build/CMakeFiles/CMakeError.log".



    any idea?
     
  16. redPanther

    redPanther Moderator Developer

    Messages:
    193
    Hardware:
    RPi1/Zero, RPi2, 32/64bit, +Arduino
  17. propergol

    propergol New Member

    Messages:
    27
    Hardware:
    RPi3
    I did enter this commands.
    export FIRMWARE_DIR="raspberrypi-firmware"
    git clone --depth 1 https://github.com/raspberrypi/firmware.git "$FIRMWARE_DIR"
    sudo cp -R "$FIRMWARE_DIR/hardfp/opt/" /opt

    Are they ok or did I miss something?
     
  18. redPanther

    redPanther Moderator Developer

    Messages:
    193
    Hardware:
    RPi1/Zero, RPi2, 32/64bit, +Arduino
    cmake can't find your firmware files. ensure that the directory /opt/vc exists and contain files.
     
  19. propergol

    propergol New Member

    Messages:
    27
    Hardware:
    RPi3
    the "raspberrypi-firmware" directory was full of "things" :geek: so I guess the issue is more its path.
    Where should it be? Mine was here /home/osmc/hyperion/raspberrypi-firmware

    Should it be in home, hyperion or build directory?
     
  20. redPanther

    redPanther Moderator Developer

    Messages:
    193
    Hardware:
    RPi1/Zero, RPi2, 32/64bit, +Arduino
    as I wrote /opt/vc

    this command should copy it into the system;
    sudo cp -R "$FIRMWARE_DIR/hardfp/opt/" /opt
    (you have to enter your password)