hyperion source from cam in front of tv - prepare input region

  • Update for now:
    I'm still using a CAM as input for hyperion NG (alpha) and it is working very well :)


    But for the moment I have switched to the USB PS3 Eye Cam because it is working better than the Logitech C250 before or the C270 I also tried to test.


    The Logitechs are working not so stable:
    - when trying to start with the Logitech they are often reported to be busy or in use; trying once again then they are sometimes working -> [hyperiond V4L2:/dev/video0] <ERROR> V4l2 init failed (Cannot open '/dev/video0' error code 16, Device or resource busy)
    - a stop/restart of the Logitech in NG (alpha) WebIF isn't working
    - the C250 is often losing connection in NG (debug reports 'set smoothing...' often) (for the working PS3 Eye only reported once when starting); restart of NG necessary
    - the C270 I can't get working in hyperion (alpha), Beta ok:
    if USB Recording is in state 'off' when starting hyperiond then always a 'Stopped' is triggered after starting USB Recording from WebIf -> hyperiond V4L2:/dev/video0] <INFO> Stopped
    or if USB Recording is in state 'on' when starting hyperiond then -> [hyperiond V4L2:/dev/video0] <ERROR> start failed (VIDIOC_STREAMON error code 5, Input/output error)
    - optional: test in hyperion.ngBeta, there is an additional 'Started' reported in debug, therefore the 'Stopped' bug #491 https://github.com/hyperion-project/hyperion.ng/issues/491 isn't existing there;
    - optional: test in hyperion.ngBeta/rework, the USB cams (grabbers?) aren't working; -> [hyperiond V4L2:auto] <ERROR> Throws error nr: VIDIOC_DQBUF error code 22, Invalid argument; also new setting/config mechanism


    So for now I will run my TV / LEDs with hyperion.ng (alpha) and the PS3 Eye cam.
    Because of the possibilities to configure the cam with v4l2-ctl parameters, it is possible to get a good result in case of no auto exposure, white balancing, brightness, ...
    The Eye cam is working without problems since 48h non stop, restart in WebIF is possible.
    After starting hyperiond the USB Recording has to be activated because of bug #491 https://github.com/hyperion-project/hyperion.ng/issues/491 once.


    With the tool from DerBen it is possible to generate and paste the LEDs trapezoid definition very simple to hyperion.config.json: https://hyperion-project.org/t…on.2615/page-3#post-10522


    My personnel todo:
    - color adjustment and tuning in hyperion.ng and maybe also with v4l2-ctl, but therefore I have to understand the ng configs and v4l2 parameters more in detail.
    - hyperion/LEDs control depending of the status of the TV (instead of grabber input before): https://hyperion-project.org/t…ure-grabber-on-rule.2730/
    - little TV picture to LED visu shift, maybe because of a problem in ng (alpha) LED config (gabs, positions, ...), not sure for now


    Future hyperion.ng enhancements:
    - trapezoid definition for the cams: https://github.com/hyperion-project/hyperion.ng/issues/504
    - v4l2-ctl controls for the cams: https://github.com/hyperion-project/hyperion.ng/issues/506


    I will follow the upcoming activities about cam usage and hope that hyperion.ng will support them because I think they are a good solution for current requirements (4k/UHD, Smart TV Apps, ...) :thumbup:


    I also hope that there is something to test in the near future ;)

  • After restart my error V4l2 init failed (Only pixel formats UYVY, YUYV, and RGB32 are supported) disappeared but i still unable to start my hp webcam with NG the cam works well in Hyperion Classic i thinking about buying ps3 cam to try NG
    giovanne so you prefer NG with ps3 cam or clasic with logitech ?

  • After restart my error V4l2 init failed (Only pixel formats UYVY, YUYV, and RGB32 are supported) disappeared but i still unable to start my hp webcam with NG the cam works well in Hyperion Classic i thinking about buying ps3 cam to try NG
    giovanne so you prefer NG with ps3 cam or clasic with logitech ?


    I can't prefer or recommend a cam. I'm currently also in 'testing mode' and only give the feedback from the tests ;)
    At the moment I'm running the PS3 Eye cam with ng, like stated in the last 'update': https://hyperion-project.org/t…on.2615/page-4#post-10624
    The ps3 eye is running stable, maybe quality (color) is not as good as the Logitechs :confused: but Logitechs are currently not running stable in ng. Ps3eye is good configurable in using higher fps (up to 60fps@640x480 or 187fps@320x240), don't know if pos. effects for hyperion...
    They are also using different drivers: uvcvideo (Logitech) vs ov534 (PS3), maybe effects on the results in stability...


    The best would be if the hyperion developers enhance the support for the cam in general, then I think every cam can work in ng :D
    First step would be: bug #491 https://github.com/hyperion-project/hyperion.ng/issues/491 (unfortunately no reaction from brindosch, I think he is busy in hyperionBeta/rework :()
    Maybe some issues are solved than, if we know the solution brindosch announced there...?

  • Hi,
    from my side no news since my last post https://hyperion-project.org/t…on.2615/page-4#post-10737
    I still (now nearly one year) using the ps3 eyecam and very lucky with it. Maybe not that detailled ambilight compared to real grabbers, but I can use every source (everything on the TV) ;)


    But again would be nice if the developers would implement general support for (usb) cams :)


    Thank you !


    Maybe i will find a ps3 eye somewhere, but for now i don't know how to start, i'm a beginner in ambilight mod. Still have no raspberry, i would like to use my android box with amlogic S905 SoC instead of raspB and install hyperion via libreElec or something else

  • Hi,
    from my side no news since my last post https://hyperion-project.org/t…on.2615/page-4#post-10737
    I still (now nearly one year) using the ps3 eyecam and very lucky with it. Maybe not that detailled ambilight compared to real grabbers, but I can use every source (everything on the TV) ;)


    But again would be nice if the developers would implement general support for (usb) cams :)


    Hi,


    could you tell me which OS you use with the Raspberry ? Raspbian ? LibreElec? OpenElec?


    Thank you :)

  • Any thoughts about using a 180° fisheye lens (or very wide angle) sitting directly in front of the TV (below the bottom edge of the screen) by about 12 inches (30cm)?


    If I understand correctly, the trapezoid tool is modifying the config.json to sample the proper areas of the screen. Fisheye would be more of a round/elliptical pattern which theoretically could be similarly adjusted (even painstakingly manually). For my setup, it may be the best option considering the placement of walls, furniture, obstructions, etc. Not sure if the 180° lens so close the the TV would work, and/or if the "internals" of HyperionNG would work.

    I can verify that a normal cheapo webcam sitting on a table in front of the TV works just fine with my build of HyperionNG.

  • i don't think fisheye is a good idea, it will look like this :


    And you will not be able even if you use trapezoidal tool to configure your grabber


    Sounds interesting, but the cam seems not that cheap ...
    Maybe cheaper in china and we can give here a try...


    I'm still using the ps3 eye cam :)


    Still have my ps3 eye and Pi cam somewhere in a box, i will not use it until i buy a TV :D
    Do you enjoy your setup ? No issue ? And by the way, did you change the exposure/gain or other setting of the PS3 eye ?

  • Thanks for the fisheye lens screengrab. It looks like I suspected. How close is the camera to the TV?


    i don't think fisheye is not a good idea...


    I don't quite follow your comment due to the double negative. I think you are meaning to say "it is a bad" idea. I agree with you that the trapezoid tool will not work. At this point, I think the fisheye could work (as long as hyperion is sampling the portion of the image within those little boxes)


    I'd think a tool can be developed to use 4 bezier curves (one for each side of the TV) and another example getLUT() function . The center of each of the boxes could be plotted equidistant along the curve to represent the LED zones. Those bezier curves could be adjusted (by a human) to follow the warped edge of the TV. I'd even say that a user could straighten the 4 curves to simulate the trapzoid tool. Of course, there's time/effort involved in creating a tool, as those demos simply show how to draw bezier curves in a browser window.


    Sounds interesting, but the cam seems not that cheap ...


    $50USD is substantially cheaper the known-good working solution using $500+ worth of HDFury equipment.


  • Sorry I wanted to say : it’s not a good idea. Because we don’t have any software like trapezoid hyperion tool. But if someone can do the same with a fisheye Capture, it could work !


    It’s not my picture. I don’t know the distance between the camera and TV sorry !

  • Thinking about the fisheye/trapezoid setup. I'm thinking the black bar detection won't work so well. I imagine the black bar detection algorithm would try to traverse inward from the top/bottom outer edges in a straight horizontal line to find the non-black pixels to project to the LEDs. I could see another way to write the algorithm.


    giovanne, can you comment if the black bar detection works with your trapezoid setup?

  • Check out this cobbled-together half-baked example using Bezier curves for definition of a fisheye LED configuration. Hacked together from this code. You can drag the handles to adjust the curves on the sample image provided by Pnp.

    • Needs to read in a .config file to get the LED counts for the top/left/right/bottom.
    • Needs to export the .config so the LED hscan and vscan position would be proper


    • many other missing pieces


  • Since I bought a 4k TV, I was thinking about implementing a webcam as a video capture device for my ambilight as well. During my research I found this topic. I already looks very promising. However, I was wondering why we don't just write a little (independent) program that captures the webcam stream, applies some sort of affine transformation and cropping, and delivers the new (low resolution) image to hyperion via proto. There are certainly some advantages and disadvantages:


    pros:
    - independent of the hyperion device - any second device can provide the transformed image via wifi
    - independent of hyperion and its version (despite the proto interface). It should also work with hyperion classic
    - filters, driver settings, auto border detections, and similar stuff related solely to this kind of capturing can be implemented in the software without messing with hyperion


    cons:
    - latency may be an issue - however since the transformation itself is pretty cheap and the resolution of the resulting image is not very important, it could be feasible
    - I fear that additional filters such as black border detection is not applied on images that are provided via proto (can someone confirm this?). So we woud need to implement this by ourself.


    Has somebody tried this approach yet? If nobody sees more disadvantages, I would try to write this (probably) small piece of software required for a proof-of-concept.


    Edit: Of course I am willing to share it and if someone has experiences in concepts like real-time video stream processing or helpful libraries like opencv I would appreciate any help ;)

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!