Beiträge von Marko Hoepken

    Hi Andrew,


    my webcam works with given software, but its bad.


    quote: The only thing we really need is trapezoid transform from capture source and some crop.


    OK, and where and how can this be added to the existing system?


    And: Important is good camera controll got get a very good image (Exposure? Whitebalance)....


    that does not come with Hyperion yer, or am I missing some?


    Marko

    Update:


    Got hello world (window with text) cross compiled.


    (.... even here are pitfalls.. GL lib was missing... .NO FREE MEAL here )


    On Ubuntu:


    sudo apt-get install mesa-common-dev
    sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev


    QT Creator does deploy my binary to my raspy.. but fails to start since its a "Gui".. how should it handle that. OK for now.


    If I start the binary on a VNC desktop running on the Raspi send to by Windows PC... Hello world works.


    This means: Cross compile with QT is working !...


    Than I tried to start a debug session...


    gdbserver was missing grrrrrrrrrr


    On raspi:


    sudo apt-get install gdbserver


    OK....



    After that debgging is still not working since it does not find shared libs...


    18:51:38: Found 101 free ports.


    18:51:38: Starting gdbserver...


    18:51:38: Debugging starts


    Listening on port 10001


    Remote debugging from host 192.168.178.51


    limiting remote suggested packet size (18431 bytes) to 16384


    Process /opt/Test_1/bin/Test_1 created; pid = 8127


    Could not load shared library symbols for 3 libraries, e.g. /usr/local/qt5pi/lib/libQt5Widgets.so.5.


    Use the "info sharedlibrary" command to see the complete listing.


    Do you need "set solib-search-path" or "set sysroot"?


    Could not load shared library symbols for 3 libraries, e.g. /usr/local/qt5pi/plugins/platforms/libqeglfs.so.


    Use the "info sharedlibrary" command to see the complete listing.


    Do you need "set solib-search-path" or "set sysroot"?


    Could not load shared library symbols for 2 libraries, e.g. /usr/local/qt5pi/plugins/egldeviceintegrations/libqeglfs-kms-integration.so.


    Use the "info sharedlibrary" command to see the complete listing.


    Do you need "set solib-search-path" or "set sysroot"?



    All the libs are there......


    Anyhow. Enough for now...




    Marko

    UPDATE: make & make install worked after adding -skip qtwayland -skip qtlocation -skip qtscript

    So, there are some modules I hopefully do not need.. when disabling them, all compiles (4 hours) AND installs.


    Victory!


    • Now I will push that to my Raspi... and do some test with simple cross compiling.
    • After that I will try to compile / install / debug Hyperion...
    • After that.. I will start thinking about my project... Making a Hyperion USB Camera.


    Thanks for your support so far.




    Marko

    OK...


    https://mechatronicsblog.com/c…qt-5-12-for-raspberry-pi/


    states.....


    You can omit the compilation of problematic or time consuming modules using the -skip argument. In this case, we have omitted the compilation of the qtwayland, qtlocation and qtscript modules.


    Means in configure by adding:


    -skip qtwayland -skip qtlocation -skip qtscript


    Will REMOVE the "problem" modules for me...


    I will now CLEAN, start again with this configure:


    ./configure -release -opengl es2 -device linux-rasp-pi3-vc4-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -v -skip qtwayland -skip qtlocation -skip qtscript


    And... wait some hours ;)


    Marko


    PS: When all works, I should try to bring the LTS to the Raspi ;)

    Oh man....


    QT 5.11.3 is a pain... since old and not an official release... grrrr.


    My first (known) issue is:


    https://forum.qt.io/topic/7501…d-cannot-find-lclip2tri/6


    Could be solved by this manual compile steps to fix missing compiles...


    WORK=$PWD
    cd ./qtlocation/src/3rdparty/clip2tri; make ; cd $WORK
    cd ./qtlocation/src/3rdparty/clipper; make ; cd $WORK
    cd ./qtlocation/src/3rdparty/poly2tri; make ; cd $WORK


    Now i ran into this:


    declarativemaps/qdeclarativegeomap.cpp:699:91: error: no matching function for call to ‘QDeclarativeGeoMap::connect


    https://forum.qt.io/topic/9107…problem-with-qt-5-10-1/16


    Also known.... realted to "older" GCC 4.x instead of 5.x (Raspi tool chain) and old verson of QT... has been fixed... but not in 5.11.3 ;(


    THAT is one of the main reasons why other use 5.12.x what is LTS (long term support).


    Let me see how to get around that....


    May I switch to ARM compile chain instead of Raspery tool?



    Just for the files: I try to compile QT on Ubuntu for a Raspi cross compile environment....


    This is NOT related to compile Hyperion.NG on the host... not there yet.



    Marko

    Hi, Lord Grey,


    "Burning Mitnight Oil".... yes, but its mostly waiting for the compile.
    Meanwhile I played online with my friends..


    I often stay up very very long.



    Quote: "8. Setup Qt Creator for Raspberry Pi cross compilation"


    I knew and found that also and used it as basis.


    I am aware of, that I have to set several things to get it running.


    On the compile side:


    "make" worked
    make install failed.... ;(


    I stopped yesterday, and have a closer look now.


    Stay tuned, Marko

    Hi,


    thanks for the advice.


    I think with the right version of QT was the key. I am on track again.


    The main issue for me here: I "just" want to code a new feature.. but has not been avare how complex the compile environment is.


    Compile is running.... let see ....


    Marko


    PS: The compile of Hyperion on the Raspi worked out of the box as documented... I READ documents and love them ;)


    BUT: For development there is not a working "how to" .... yet ;)

    Hi Lord-Grey,


    thanks for the information.
    That is helpfull!


    Overall the build environment is really a jungle with a lot of pitfalls.



    Currently I try (and wait a lot) the way how QT is recommending it.


    https://wiki.qt.io/RaspberryPi2EGLFS


    The overseen problem from ME is that:


    On Rapsi:
    sudo apt-get build-dep libqt5gui5


    Gets "any unknown for me" version of QT and on my PC host I try to crosscompile I explicitly downloaded: LTS qt-everywhere-src-5.12.6


    My bet: They are not matching.


    Currently I got much much further as in my last post, but still not full compiling.


    So my NEXT step:


    Check version I got on raspi and but THAT on the Ubuntu ;) as you recomend:


    To find out which Qt version is installed, run
    Code:
    qmake --version


    I got: 5.11.3


    By cross compile version is: 5.12.6 ;(


    On the toolchain currently try to use the one Raspery is giving us:


    git clone https://github.com/raspberrypi/tools


    NOT your suggested:


    https://developer.arm.com/-/me…wnloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz?revision=fed31ee5-2ed7-40c8-9e0e-474299a3c4ac&la=en&hash=76DAF56606E7CB66CC5B5B33D8FB90D9F24C9D20


    On the Ubuntu I decieded to use the LTS version: 18.04... also different than yours.


    So at the end of the day:


    THERE ARE A LOT COMBINATIONS, that will matter .... and I have not been aware about it.


    Let make a summary, what is important:


    1. Raspery Pi version (I will stick to 4b, since I need horsepower) --> Here I may need use optimisation of linux-rasp-pi3-vc4-g++ since newer may not be supported yet
    2. Ubuntu version (VM on PC) LTS 18.04 or newer?
    3. QT version on Raspi (--> fixed by package manager) 5.11.3
    4. Cross compile tool chain (https://github.com/raspberrypi/tools or ARM) ??? I will stay with the raspberrypi tool chain


    My step: Clean up and restart next approach ...


    Anyhow.. I take note of ALL steps I did an will finally have a way that works.


    This will go into a document, I will make up...


    Greeting, Marko

    Hi Lord Grey,


    today I started working on setting up the enviroment for full crosscompile and remote debug.
    There has been some good documents how to do it.


    But... all is > 1 year old and not done on Raspi 4.


    you wrote:


    IDE: QT Creator, as it nicely fits with the QT framework


    what 5.x QT version are you using?


    I try setup my build environment and run into some compile issues.
    I tried "latest" (5.14)... what may not be a good idea ;)


    Beside that: for the configure step the QT configure step the build requires a device....
    I have an Raspi 4... that seem not supported yet.



    ../qt-everywhere-src-5.14.0/configure -opengl es2 -device linux-rasp-pi3-g++ ...


    So still some work to do.... before I can work on my project at all ... but cross compile and debug is an interesting concept.


    Marko

    Hi,


    BACKGROUND


    Target: Best quality Hyperion NG with working with ALL content (smart TV, streaming video etc...)


    As known, a camera is "the" solution of that problem, but it is tricky.


    The advanates and disadvantages has been discussed....


    Since a USB camera /dev/video0 delivers this: (camera mounted at the ceiling ~1.5m away from TV)



    I do not want to fix this by fancy LED configuration, what basically works.


    A camera can only work in good conitions.


    In my case: Dark room, no reflection, 4K HDR TV, decent USB camera (50€ class, not 5€).


    That is a good starting point.


    Additional "fancy" camera processing is required... a real "NG Feature" ;)


    This is not for cheap.


    1. Good USB camera ( --> READY)
    2. Horsepower for processing (Raspi 4) ( --> READY)
    3. Dewarping of image (--> Need rectangle image as default Hyperion processing) (MISSING)
    4. Full camera control (Exposure control, whitebalance, color calibration etc) (MISSING)


    Good thing: All framre grabber will also benefit from that


    WHAT CAN BE DONE


    A Raspi 4 with a quad core ARM can do a lot.
    Technical (driver, C++ code base) all is available in the open source community.


    I want NO compromise on quality. In the past there has been performance bottlenecks,
    but that is no longer the case .. with Raspi 4.


    So, the idea is to add "native" USB camera support to Hyperion NG


    Native means, a Hyperion specific "image processor" that does fix / control ANY problem of
    any given /dev/video0 USB video camera or frame grabbers.


    HOW CAN THIS BEE ADDED


    I suggest to add a separate software module that does ALL the camera / video preprocessing.


    The idea is, that it takes the /dev/videoxxx souce ( USB camera, Camera, Frame grabber).


    It does all processing and delivers than the frame buffer to Hyperion as addtional video source.


    WHAT CAMERA / VIDEO CONTROL IS REQUIRED


    To Hyperion NG, there will be added a separate control for the camera / preprocessor


    It offers the at least the following interfaces


    Capture:

    • Device selection
    • Capture format (Resolution)
    • Cropping


    Exposure (only on camera devices, not on frame grabber)

    • Framerate / Exposure
    • Gain
    • Possibly "smart autocontrol"


    Color

    • Whitebalance
    • Contrast
    • Hue
    • Luninance
    • Gamma
    • (Lut)


    Geometry

    • Trapez correction (4 point)
    • Dewarping (fish eye) (bezier curves)


    Post processing

    • Denoise
    • Prefilter (smoothing)
    • Output format (downsize)


    USER INTERFACE


    The user interface is a separate screen in the NG interface.


    It shows all of the controlls above.


    For calibration / settings it may be a good idea to build a small QT live gui.
    This GUI runs native on the Raspi showing a live image on the HDMI output.


    A "simple" version may be done with the web interface... I have no idea how this can be done.


    The user will do 3 steps:


    1. Enable "Preprocessor" (instead of /dev/video... or intern)
    --> This tells Hyperion NG to take the frame buffer from the video processor
    2. Go to Preprocessor
    --> Make default seetings (Device, format....)
    --> Calibrate geometry
    --> Calibrate image quality
    3. Optional: Run special software to calibrate the preprocessor



    DISCUSSION


    That is the "plan". ,, Please coment below.


    Questions:


    • It this approach feasable?
    • Architecture / integration well thought?
    • Missing features?
    • What is overseen?


    Thanks, Marko

    Hi all,


    thanks for the fast answers.


    Let me "compile" how you all seem to work:


    1. Development (code, test, debug) is done on fat client running Ubunut. This may be a virtual machine
    2. For testing, no leds are conneted to the pc, but file io or other methods are used
    3. Real capture devices (or camera) can be run on the PC as video source
    4. You compile x86 code for the development to run on ubuntu (guessing noboddy has ARM host)
    5. Real live testing is done on Raspi....
    6. For real testing compile (git update, make , make install) can be done on Raspi (takes long)
    7. Cross compile on fat host save time. Flow: On Ubuntu crosscompile, than scp to Raspi, than make install & test


    OK, that was the aswer I expected.


    I think I will go with the Lord Grey enviroment...


    OS: Ubuntu 18.10 in a VM-Ware player (I successfully compiled in Ubuntu 16 and 19, too).
    IDE: QT Creator, as it nicely fits with the QT framework
    GIT Repository: SmartGit
    Qt app inspection: GammaRay
    SQLight: DB Browser for SQLite, in case you want to update the hyperion.ng configuration DB without UI


    QUESTION: Is there a documtentation, how to setup all of this?


    If NO: I will try to create this how_to_develo,md


    Thanks Marko

    Hi Michael,


    ich hatte von Deiner Änderung gelesen (pull request) , aber wenn ich das korrekt versteh werden noch "nur" die LED Koordinaten umgerechnet, oder?
    Meine Annahme war, dass dann die automatischen Randerkennung nicht korrekt funktioniert.


    Falls der Trapezoid schon das Bild korrigiert... cool!


    Testen will ich das auf jeden Fall. In der Anlage eines Screenshots von meine TV... ist 75" 4K.


    Wie finde ich den Branch, bzw kannst mir einen Links schicken?


    Aber zu meiner Frage: Wie entwickelst Du? Auf dem Raspi?


    Ich glaub ja kaum, das man den C-code im Editor hackt und dann make macht... ;) oder?



    Danke Marko

    Hi,


    I am from Germany and just trieded Hyperion out of the box... with USB camera.
    Worked good so far...


    Since there is still the open issue of "trapez distortion" comming from USB cam filming the screen.


    Long story short: I would like to work on that.... on the NG.. but do not know how...


    I have some experience with embeded software, but have not done linux SW development stuff.
    ...but have some long Linux user experience (engineer), so I know what bash, ssl, vnc... deamon, vi etc. is ;)


    What I have done so far:


    • Got Raspi 4b
    • Got Camera
    • Have 160 LED's around my large TV.
    • All works with Hyperion as is...
    • I managed to download NG, compiled it on the Raspi and it works.


    At home I have a Windows PC... with VM for Linux on demand.


    I had a first look to the C++ code of the NG and would like to "play" with it.


    My goal: Add good configurabel usb camera support to NG.


    • Runs on latest Raspi 4 (need horsepower)
    • USB cam image will get on the fly trapez correction (I what to add that)
    • All function of the processing should work as from a "regular" frame grabber
    • I don not want "special distorion matrix"... the Hyperion processing should work on a squar image.


    Why:


    I want to use my smart TV as is with out 4K, HDR, protection issues. I think a camera is the right way to go.


    Will it be good? Hopefully I can add as much image processing to get a good result.. the Raspi 4 has horepower...


    So my questions:


    How do YOU develope the Hyperion NG software?


    I did already spend 1/2 day of playing around, but that is not efficient.


    What is the best environment... ?


    • On the Rasi?
    • On Linux PC (ARM?)
    • VM?
    • Eclipse?
    • Other?
    • What about the QT
    • What about the web server.....


    I managed to download all source and was able to build it on thr Raspi 4... took just one hour.


    I need a "super charge" by of one of you how to start.... I will figure out the rest..


    Does someone has as VM that includes all I / we need?


    Thanks Marko


    PS: I love Hyperion!