Linux 20.04.06 LTS: The THETA Z1 live streaming viewer works, but it does not function from loopback. I want to use it with OpenCV by recognizing it as a camera, but it is not recognized.
When connected via USB, the device is recognized normally and works fine with the viewer. However, when I run the loopback, it starts working but then keeps shutting down.
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Sep_21_10:33:58_PDT_2022
Cuda compilation tools, release 11.8, V11.8.89
Build cuda_11.8.r11.8/compiler.31833905_0
When I run gst-inspect-1.0 --version as part of the steps in the “Overview of Steps” from this guide, the output is as follows:
Therefore, I matched the gst-plugins-bad version to 1.16.3, included the CODEC SDK version 12.2 in the gst-plugins-bad, ran NVENCODE_CFLAGS, and then proceeded with make. However, I encountered the following error:
Oh, I was using CUDA version 11.8, so I downgraded the SDK to version 11.~ and re-ran everything, and it works correctly now. However, there are still occasional frame glitches, but I’ll continue to refine the code.
@craig The latency has also significantly decreased. Thank you for your help!
thank you for reporting on the solution as it help help other people.
There are different possibilities for the frame glitch
power supply to THETA. You may want to use a powered hub for consistent power. The input should conform to BC 1.2 CDP, which specifies 1.5A data plus charge. See this: Camera - RICOH THETA Development on Linux. A cheap in-line USB power meter can help debug power issues
if you’re running computer on a robot with battery power, the computer itself may not have stable power or a slight undervolt
depending on processing, the computer or the GPU may be experiencing thermal issues (or power)
the THETA camera may be experiences thermal issues (you can just put your hand on the camera as a quick test)
the USB cable could introduce a problem. try a different cable
make sure you have the newest camera firmware (you need a mac/windows for desktop update or ios/android for mobile update)
other
isolate problem by first streaming without OpenCV and see if the frame glitch occurs without OpenCV
I don’t see the glitches on my system, so it’s likely you can resolve the problem eventually
have you tried gstthetauvc instead of libuvc-theta-sample?