SINTEFMedtek / CustusX

Research Platform for Image-Guided Therapy
http://www.custusx.org
Other
62 stars 25 forks source link

Not working on endscopy optical fiber camera #30

Closed shu-gong closed 2 years ago

shu-gong commented 2 years ago

Hi developers,

I tried to use CustusX to display video from a UVC endscopy optical fiber camera, but it didn't work. The Cheese can't detect the camera either. However, when I used the command "guvcview /dev/video0", it works well. My ubuntu version is 20.04. And I used the nightly build version of CustusX.

When I typed "lsubs", it shows: Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 003: ID 13d3:3563 IMC Networks Wireless_Device Bus 003 Device 002: ID 27c6:521d Shenzhen Goodix Technology Co.,Ltd. FingerPrint Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 0b05:19b6 ASUSTek Computer, Inc. N-KEY Device Bus 001 Device 010: ID 046d:c092 Logitech, Inc. G102 LIGHTSYNC Gaming Mouse Bus 001 Device 020: ID 5357:3001 Suwaytech Inc SWT USB2.0 Camera Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

We can see "Bus 001 Device 020: ID 5357:3001 Suwaytech Inc SWT USB2.0 Camera" the camera is detected normally.

Then I typed "dmesg", the terminal shows: [ 844.285468] usb 1-1: new high-speed USB device number 17 using xhci_hcd [ 844.451837] usb 1-1: New USB device found, idVendor=5357, idProduct=3001, bcdDevice= 1.00 [ 844.451848] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 844.451851] usb 1-1: Product: SWT USB2.0 Camera [ 844.451854] usb 1-1: Manufacturer: Suwaytech Inc [ 844.451856] usb 1-1: SerialNumber: 30M46A0000000101 [ 844.456852] usb 1-1: Found UVC 1.00 device SWT USB2.0 Camera (5357:3001)

However, when I start Cheese or CustusX, both of them don't detect the camera.

I tried to plugin another normal webcam, both Cheese and CustusX can detect it. Therefore, I typed "dmesg", the terminal shows: [ 835.905232] usb 1-1: new high-speed USB device number 16 using xhci_hcd [ 836.274243] usb 1-1: New USB device found, idVendor=046d, idProduct=0825, bcdDevice= 0.12 [ 836.274253] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=2 [ 836.274257] usb 1-1: SerialNumber: 4A29AF60 [ 836.293500] usb 1-1: Found UVC 1.00 device (046d:0825) [ 836.408453] input: UVC Camera (046d:0825) as /devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-1/1-1:1.0/input/input41

The last line [ 836.408453] input: UVC Camera (046d:0825) as /devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-1/1-1:1.0/input/input41 is missing when I pluggined the endscopy optical fiber camera, so I am guessing this is where the problem is.

Does someone else have the same issue?

Shu

olevs commented 2 years ago

Dear Shu,

We haven't tested CustusX with all kind of video sources. CustusX use OpenCV for video grabbing, and the video can also be sent over OpenIGTLink.

There may be something with the driver that makes CustusX/OpenCV fail to grab the video. One more thing you could try is to change video port from 0 to 1 (or 2). I think the default CustusX setup always use port 0 (even if the "Video Port" selector is set to something else). To test with another port from the CustusX GUI I think you will have to mark the checkbox "Run as separate process" in the "Video Grabber" selection in the "Video Connection" widget. Then the application OpenIGTLinkServer will run as a separate process, and will use the video port specified in the CustusX GUI as input.

Best Regards, Ole Vegard Solberg