Beiträge von stewe93

    dinvlad I tried the new script, calibrate_screen still fails with the following error:

    Code
    python3 calibrate_screen.py 
    Waiting for shutdown of Hyperion V4L component ...
    Traceback (most recent call last):
      File "calibrate_screen.py", line 382, in <module>
        main()
      File "calibrate_screen.py", line 377, in main
        show_leds(mon, cap, leds, crop, args.frame_preview_delay_ms)
      File "calibrate_screen.py", line 297, in show_leds
        cv2.rectangle(img, np.int32((p[0], p[2])), np.int32((p[1], p[3])), (255, 0, 0))
    TypeError: Scalar value for argument 'color' is not numeric

    I was able to fix this issue with the following changes:

    Code
         for p in leds:
    -        cv2.rectangle(img, np.int32((p[0], p[2])), np.int32((p[1], p[3])), (255, 0, 0))
    +        pt1=(int(p[0]),int(p[2]))
    +        pt2=(int(p[1]), int(p[3]))
    +        cv2.rectangle(img=img, pt1=pt1, pt2=pt2, color=(255, 0, 0))
    
         img = img[crop.y : crop.y + crop.h, crop.x : crop.x + crop.w, :]

    And the result is almost fine:

    dinvlad I restarted the whole process to properly document every step of it in case anyone else interested. Im using a Raspbarry Pi 4:

    • Installed Raspios with desktop (https://downloads.raspberrypi.…-raspios-buster-armhf.zip)
    • Enabled SSH and configured Wifi by wpa_supplicant file on boot partition
    • After first boot, applied updated with sudo apt update && sudo apt upgrade
    • Installed Hyperion NG with the deb package (wget https://github.com/hyperion-project/hyperion.ng/releases/download/2.0.0-alpha.9/Hyperion-2.0.0-alpha.9-Linux-armv7l.deb && sudo apt install ./Hyperion-2.0.0-alpha.9-Linux-armv7l.deb)
    • After installation, the 4K output to the TV is gone, but its "normal" in this case, you should turn off Platform Capture under capturing hardware on the hyperion web interface (http://YourIp:8090/#conf_grabber)
    • sudo reboot via ssh
    • Checked out Your repo (git clone https://github.com/dinvlad/HyperVision.git)
    • Your suggestion is already insatalled but found the package I installed: sudo apt install libatlas-base-dev to make it work.
    • Installed the requirements "by hand" (pip3 install requests opencv-python screeninfo)
    • Calibrate camera runs without problem after all of the above
    • params.json
    • python3 calibrate_screen.py in my case need some fixes, I did figure out the followings:
    • At this point I stuck with the following error:
    • A picture of the enviroment



    Python version: 3.7.3

    OpenCV version: 4.5.1



    Could you please help me out with this? I also tried the fisheye calibration but that failed as well for me.

    Hello Folks!

    dinvlad I tried your script, the exact process i did is:

    - install Raspbian with desktop (https://downloads.raspberrypi.…-raspios-buster-armhf.zip)

    - install hyperion ng

    - turned off platform capture in hyperion (maybe this should be in the readme) to be able to use the 4k tv for your script (as I know hyperion platform capture and 4k output doesnt work together)

    - installed a dependency manually becasue of this error (I cant remember what was it):

    Python
    ~/HyperVision $ python3 calibrate_camera.py
    Traceback (most recent call last):
    File "calibrate_camera.py", line 8, in <module>
    import cv2
    File "/home/pi/.local/lib/python3.7/site-packages/cv2/__init__.py", line 5, in <module>
    from .cv2 import *
    ImportError: libcblas.so.3: cannot open shared object file: No such file or directory

    - then I was able to run the camera calibration

    - then tried the screen calibration, i get this error:

    Code
    ~/HyperVision $ python3 calibrate_screen.py 
    Traceback (most recent call last):
      File "calibrate_screen.py", line 379, in <module>
        main()
      File "calibrate_screen.py", line 357, in main
        crop, new_k_inv, p_t = get_screen_transforms(blank, cam, args.cam_alpha)
      File "calibrate_screen.py", line 196, in get_screen_transforms
        cam_alpha,
    SystemError: new style getargs format but argument is not a tuple

    I'm not a python magician but tried a few things, and failed with it, so could you help me out?

    Python version: 3.7.3

    OpenCV version: 4.5.1


    The last answer here maybe related to this issue but I'm just guessing: https://stackoverflow.com/ques…tuple-when-using/43656642