TheImagingSource / ic4-examples

IC4 Example Programs
Apache License 2.0
5 stars 3 forks source link

IC4 can not find usable device in virtual desktop #16

Closed Skullface9512 closed 2 months ago

Skullface9512 commented 4 months ago

Recently i try to connect camera to the virtual desktop, the related drivers have been installed, such as ImagingControl4 SDK, usd driver and camera driver, and IC Capture can be used normally, after connect the camera, i can find it in device manager in computer, but when i use python script by imagingcontrol4 library, it cannot find the device, and i can find it by python in local computer. please help me how to solve this problem.

TIS-Tim commented 4 months ago

What is the virtual desktop? Which camera do you use?

When using ic4, you need to install one of the items from the GenTL Producers / IC4 Drivers section from our Downloads page.

Btw when you use python, you do not even need to install the ic4 SDK (unless you want the offline documentation); all software is downloaded via pypi.

Skullface9512 commented 4 months ago

The camera i used is DFM 37UX178-ML, the virtual desktop is similar to a server, local computer can access it,I in the the GenTL Producers / IC4 Drivers, i only installed usb drivers and not installed other drivers, and python library imagingcontrol4 i have installed.

TIS-Tim commented 4 months ago

Please run these lines in a Python script to debug device enumeration:

import imagingcontrol4 as ic4
ic4.Library.init(internal_log_level=ic4.LogLevel.DEBUG, log_targets=ic4.LogTarget.STDOUT)
print(ic4.Library.get_version_info())
print(ic4.DeviceEnum.devices())

What is the output?

get_version_inforequires ic4 version 1.1; upgrade via pip if you havent done so lately.

Edit: Fixed typo in Python code.

Skullface9512 commented 4 months ago

The output is: Traceback (most recent call last): File "D:\python\grab_image1.py", line 2, in ic4.Library.init(internal_log_level=ic4.LogLevel.DEBUG, log_target=ic4.LogTarget.STDOUT) TypeError: init() got an unexpected keyword argument 'log_target' the imagingcontrol4 version is 1.1.0.2833

TIS-Tim commented 4 months ago

Sorry, my bad. It should have been log_targets with an s. I edited the code above.

Skullface9512 commented 4 months ago

Here is the output: [ic4 internal][ debug][ PluginLoader.cpp:17 ] Looking for plugins in D:\Anaconda\lib\site-packages\imagingcontrol4\ [ic4 gentl_cons][ debug][ gentl_enum.cpp:186 ] Searching directory C:\Program Files\The Imaging Source Europe GmbH\IC4 GenTL Driver for USB3Vision Devices\bin [ic4 gentl_cons][ debug][ gentl_enum.cpp:192 ] Found GenTL producer file C:\Program Files\The Imaging Source Europe GmbH\IC4 GenTL Driver for USB3Vision Devices\bin\ic4-gentl-u3v.cti [ic4 internal][ info][ VideoCaptureDeviceEnum.cpp:642 ] Opening transport layer C:/Program Files/The Imaging Source Europe GmbH/IC4 GenTL Driver for USB3Vision Devices/bin/ic4-gentl-u3v.cti [ic4 gentl_cons][ debug][ gentl_enum.cpp:186 ] Searching directory C:\Program Files\The Imaging Source Europe GmbH\IC4 GenTL Driver for USB3Vision Devices\bin [ic4 gentl_cons][ debug][ gentl_enum.cpp:192 ] Found GenTL producer file C:\Program Files\The Imaging Source Europe GmbH\IC4 GenTL Driver for USB3Vision Devices\bin\ic4-gentl-u3v.cti [ic4 gentl_cons][ debug][ gentl_enum.cpp:186 ] Searching directory C:\Program Files\The Imaging Source Europe GmbH\IC4 GenTL Driver for USB3Vision Devices\bin [ic4 gentl_cons][ debug][ gentl_enum.cpp:192 ] Found GenTL producer file C:\Program Files\The Imaging Source Europe GmbH\IC4 GenTL Driver for USB3Vision Devices\bin\ic4-gentl-u3v.cti [ic4 internal][ info][ VideoCaptureDeviceEnum.cpp:642 ] Opening transport layer C:/Program Files/The Imaging Source Europe GmbH/IC4 GenTL Driver for USB3Vision Devices/bin/ic4-gentl-u3v.cti [ic4 gentl_cons][ debug][ gentl_enum.cpp:186 ] Searching directory C:\Program Files\The Imaging Source Europe GmbH\IC4 GenTL Driver for USB3Vision Devices\bin [ic4 gentl_cons][ debug][ gentl_enum.cpp:192 ] Found GenTL producer file C:\Program Files\The Imaging Source Europe GmbH\IC4 GenTL Driver for USB3Vision Devices\bin\ic4-gentl-u3v.cti IC4: Core Library: 1.1.0.2833

Plugins: Generic OpenGL Renderer: 1.1.0.2833 Win32 OpenGL Renderer: 1.1.0.2833 Win32 H264 Video Writer: 1.1.0.2833 Win32 H265/HEVC Video Writer: 1.1.0.2833

Drivers: IC4 GenTL Driver for USB3Vision Devices: 1.1.0.373

[ic4 gentl_cons][ debug][ gentl_enum.cpp:186 ] Searching directory C:\Program Files\The Imaging Source Europe GmbH\IC4 GenTL Driver for USB3Vision Devices\bin [ic4 gentl_cons][ debug][ gentl_enum.cpp:192 ] Found GenTL producer file C:\Program Files\The Imaging Source Europe GmbH\IC4 GenTL Driver for USB3Vision Devices\bin\ic4-gentl-u3v.cti [ic4 internal][ info][ VideoCaptureDeviceEnum.cpp:642 ] Opening transport layer C:/Program Files/The Imaging Source Europe GmbH/IC4 GenTL Driver for USB3Vision Devices/bin/ic4-gentl-u3v.cti [ic4 gentl_cons][ debug][ gentl_enum.cpp:186 ] Searching directory C:\Program Files\The Imaging Source Europe GmbH\IC4 GenTL Driver for USB3Vision Devices\bin [ic4 gentl_cons][ debug][ gentl_enum.cpp:192 ] Found GenTL producer file C:\Program Files\The Imaging Source Europe GmbH\IC4 GenTL Driver for USB3Vision Devices\bin\ic4-gentl-u3v.cti []

TIS-Tim commented 4 months ago

OK, so ic4 communicates with the U3V GenTL Producer (which is the correct driver for your camera), but it doesn't see devices.

Can you check that the kernel driver for the U3V interface of the device is installed correctly?

There should be an entry The Imaging Source Europe GmbH GenTL-U3V Camera in the Imaging Devices section of the Windows Device Manager.

TIS-Tim commented 4 months ago

I just tried this; even if the wrong driver is installed, the camera should still be listed, it would just fail to open afterwards.

Can you please stop and restart the ic4-gentl-u3v-service service from the Services tab of Windows Task Manager?

Skullface9512 commented 4 months ago

Yes, i can find it in Imaging Devices, the device are Imaging Source Europe GmbH DFM 37UX178-ML and Imaging Source Europe GmbH GenTL-U3V Camera, but i cannot find it by python

TIS-Tim commented 4 months ago

Did you also try the service restart (or just reboot the system)?

Skullface9512 commented 4 months ago

Yes, i have rebooted it serval times.

TIS-Tim commented 4 months ago

I still don't quite understand what this "virtual desktop" technology is you are talking about.

Is this some kind of virtual machine? Is the camera visible in Windows Device Manager inside that virtual machine?

Skullface9512 commented 4 months ago

Yes, i can find the Imaging Source Europe GmbH DFM 37UX178-ML and Imaging Source Europe GmbH GenTL-U3V Camera in Windows Device Manager inside virtual machine

TIS-Tim commented 4 months ago

This might be obvious to you, but for me it is not. What exactly is this "Virtual Desktop" you are talking about?

Additionally: I totally missed that you are still on the old U3V GenTL Producer. Please install the updated version 1.2 from here.

Does that change anything?

Skullface9512 commented 4 months ago

I installed version 1.2 but doesn't work, and the output is here: [ic4 internal][ debug][ PluginLoader.cpp:17 ] Looking for plugins in D:\Anaconda\lib\site-packages\imagingcontrol4\ [ic4 gentl_cons][ debug][ gentl_enum.cpp:186 ] Searching directory C:\Program Files\The Imaging Source Europe GmbH\IC4 GenTL Driver for USB3Vision Devices\bin [ic4 gentl_cons][ debug][ gentl_enum.cpp:192 ] Found GenTL producer file C:\Program Files\The Imaging Source Europe GmbH\IC4 GenTL Driver for USB3Vision Devices\bin\ic4-gentl-u3v.cti [ic4 internal][ info][ VideoCaptureDeviceEnum.cpp:642 ] Opening transport layer C:/Program Files/The Imaging Source Europe GmbH/IC4 GenTL Driver for USB3Vision Devices/bin/ic4-gentl-u3v.cti [ic4 gentl_cons][ debug][ gentl_enum.cpp:186 ] Searching directory C:\Program Files\The Imaging Source Europe GmbH\IC4 GenTL Driver for USB3Vision Devices\bin [ic4 gentl_cons][ debug][ gentl_enum.cpp:192 ] Found GenTL producer file C:\Program Files\The Imaging Source Europe GmbH\IC4 GenTL Driver for USB3Vision Devices\bin\ic4-gentl-u3v.cti [ic4 gentl_cons][ debug][ gentl_enum.cpp:186 ] Searching directory C:\Program Files\The Imaging Source Europe GmbH\IC4 GenTL Driver for USB3Vision Devices\bin [ic4 gentl_cons][ debug][ gentl_enum.cpp:192 ] Found GenTL producer file C:\Program Files\The Imaging Source Europe GmbH\IC4 GenTL Driver for USB3Vision Devices\bin\ic4-gentl-u3v.cti [ic4 internal][ info][ VideoCaptureDeviceEnum.cpp:642 ] Opening transport layer C:/Program Files/The Imaging Source Europe GmbH/IC4 GenTL Driver for USB3Vision Devices/bin/ic4-gentl-u3v.cti [ic4 gentl_cons][ debug][ gentl_enum.cpp:186 ] Searching directory C:\Program Files\The Imaging Source Europe GmbH\IC4 GenTL Driver for USB3Vision Devices\bin [ic4 gentl_cons][ debug][ gentl_enum.cpp:192 ] Found GenTL producer file C:\Program Files\The Imaging Source Europe GmbH\IC4 GenTL Driver for USB3Vision Devices\bin\ic4-gentl-u3v.cti IC4: Core Library: 1.1.0.2833

Plugins: Generic OpenGL Renderer: 1.1.0.2833 Win32 OpenGL Renderer: 1.1.0.2833 Win32 H264 Video Writer: 1.1.0.2833 Win32 H265/HEVC Video Writer: 1.1.0.2833

Drivers: IC4 GenTL Driver for USB3Vision Devices: 1.2.0.444

[ic4 gentl_cons][ debug][ gentl_enum.cpp:186 ] Searching directory C:\Program Files\The Imaging Source Europe GmbH\IC4 GenTL Driver for USB3Vision Devices\bin [ic4 gentl_cons][ debug][ gentl_enum.cpp:192 ] Found GenTL producer file C:\Program Files\The Imaging Source Europe GmbH\IC4 GenTL Driver for USB3Vision Devices\bin\ic4-gentl-u3v.cti [ic4 internal][ info][ VideoCaptureDeviceEnum.cpp:642 ] Opening transport layer C:/Program Files/The Imaging Source Europe GmbH/IC4 GenTL Driver for USB3Vision Devices/bin/ic4-gentl-u3v.cti [ic4 gentl_cons][ debug][ gentl_enum.cpp:186 ] Searching directory C:\Program Files\The Imaging Source Europe GmbH\IC4 GenTL Driver for USB3Vision Devices\bin [ic4 gentl_cons][ debug][ gentl_enum.cpp:192 ] Found GenTL producer file C:\Program Files\The Imaging Source Europe GmbH\IC4 GenTL Driver for USB3Vision Devices\bin\ic4-gentl-u3v.cti []

TIS-Tim commented 4 months ago

Can you please answer my other question:

This might be obvious to you, but for me it is not. What exactly is this "Virtual Desktop" you are talking about?

Skullface9512 commented 4 months ago

When i used IC capture, it loaded very slowly and have a high delay, so i think maybe it has not completed the initialization, so it cannot find the device. The vitual desktop is similar to a large server, everyone has their own account to login in, and inside is just windows system, we can upload or download the file we need, it also can access the internet and visit website.

TIS-Tim commented 4 months ago

Can you provide a link to a website describing that technology? Who created it?

Skullface9512 commented 4 months ago

here is the azure virtual desktop, which is similar to we used, you can see its introduction.

TIS-Tim commented 4 months ago

So the camera is connected to your local computer, but the software is running on a server?

Even if forwarding access to the USB device would work... you do realize that the camera will send uncompressed data, requiring a lot of bandwidth?