Error during rsid-cli capture on Raspberry Pi 4
Target: Raspberry Pi 4 model B
RealSense version: v.21.0
F455 FW version: 0.21.0
Compile options: -DRSID_PREVIEW=ON -DRSID_SAMPLES=ON
Connection: F455 connected to USB3.0 port on the Pi
Problem description:
Tried to initiate a capture 'c' from rsid-cli, but seeing error "Corrupt JPEG data" in the logs which also indicates devices video2-8 not present. Dmesg shows F455 the unknown video format from uvcvideo.
Logs
pi@raspberrypi:/ssd/realsense_id/RealSenseID/build/bin $ sudo ./rsid-cli /dev/ttyACM0 USB
[2021-07-18 22:41:37.838] [debug] [LinuxSerial] Opening serial port /dev/ttyACM0 baudrate 115200
Connected to device
[2021-07-18 22:41:37.931] [debug] [NonSecureSession] Start session
[2021-07-18 22:41:37.931] [debug] [PacketSender] Sending packet 'o'
[2021-07-18 22:41:37.932] [debug] [PacketSender] Waiting packet..
[2021-07-18 22:41:38.095] [debug] [PacketSender] Received packet 'o' after 162 millis
[2021-07-18 22:41:38.095] [debug] [PacketSender] Sending packet 'q'
[2021-07-18 22:41:38.097] [debug] [PacketSender] Waiting packet..
[2021-07-18 22:41:38.116] [debug] [PacketSender] Received packet 'q' after 19 millisAuthentication settings::
* Rotation: 0 Degrees
* Security: Medium
* Algo flow Mode: All
* Face policy : Single
* Dump Mode: None
[2021-07-18 22:41:38.116] [debug] [NonSecureSession] Close session
Please select an option:'e' to enroll.
'a' to authenticate.
'd' to delete all users.
'c' to capture images from device.
's' to set authentication settings.
'g' to query authentication settings.
'u' to query ids of users.
'n' to query number of users.
'b' to save device's database before standby.
'v' to view additional information.
'x' to ping the device.
'q' to quit.
server mode options:
'E' to enroll with faceprints.
'A' to authenticate with faceprints.
'U' to list enrolled users
'D' to delete all users.> c
/sys/class/video4linux/video2/device/*/*/id/vendor: No such file or directory
/sys/class/video4linux/video2/device/*/*/id/product: No such file or directory
/sys/class/video4linux/video3/device/*/*/id/vendor: No such file or directory
/sys/class/video4linux/video3/device/*/*/id/product: No such file or directory
/sys/class/video4linux/video4/device/*/*/id/vendor: No such file or directory
/sys/class/video4linux/video4/device/*/*/id/product: No such file or directory
/sys/class/video4linux/video5/device/*/*/id/vendor: No such file or directory
/sys/class/video4linux/video5/device/*/*/id/product: No such file or directory
/sys/class/video4linux/video6/device/*/*/id/vendor: No such file or directory
/sys/class/video4linux/video6/device/*/*/id/product: No such file or directory
/sys/class/video4linux/video7/device/*/*/id/vendor: No such file or directory
/sys/class/video4linux/video7/device/*/*/id/product: No such file or directory
/sys/class/video4linux/video8/device/*/*/id/vendor: No such file or directory
/sys/class/video4linux/video8/device/*/*/id/product: No such file or directory
[2021-07-18 22:41:42.168] [debug] [Utilities] capture devices 1
starting preview for 3 seconds [2021-07-18 22:41:42.206] [debug] [Preview] Preview started!frame #0: 1056x1920 (6082560 bytes)
frame #1: 1056x1920 (6082560 bytes)
frame #2: 1056x1920 (6082560 bytes)
frame #3: 1056x1920 (6082560 bytes)
frame #4: 1056x1920 (6082560 bytes)
frame #5: 1056x1920 (6082560 bytes)
frame #6: 1056x1920 (6082560 bytes)
frame #7: 1056x1920 (6082560 bytes)
frame #8: 1056x1920 (6082560 bytes)
frame #9: 1056x1920 (6082560 bytes)
frame #10: 1056x1920 (6082560 bytes)
frame #11: 1056x1920 (6082560 bytes)
Corrupt JPEG data: 123 extraneous bytes before marker 0xd2
frame #12: 1056x1920 (6082560 bytes)
Corrupt JPEG data: 851 extraneous bytes before marker 0xd1
frame #13: 1056x1920 (6082560 bytes)
Corrupt JPEG data: premature end of data segment
frame #14: 1056x1920 (6082560 bytes)
Corrupt JPEG data: 235 extraneous bytes before marker 0xd0
frame #15: 1056x1920 (6082560 bytes)
Corrupt JPEG data: 3123 extraneous bytes before marker 0xd2
frame #16: 1056x1920 (6082560 bytes)
Corrupt JPEG data: 3445 extraneous bytes before marker 0xd1
frame #17: 1056x1920 (6082560 bytes)
Corrupt JPEG data: 219718 extraneous bytes before marker 0xd1
frame #18: 1056x1920 (6082560 bytes)
Corrupt JPEG data: 4295 extraneous bytes before marker 0xd1
frame #19: 1056x1920 (6082560 bytes)
Corrupt JPEG data: 1246 extraneous bytes before marker 0xd0
frame #20: 1056x1920 (6082560 bytes)
frame #21: 1056x1920 (6082560 bytes)
Corrupt JPEG data: premature end of data segment
frame #22: 1056x1920 (6082560 bytes)
Corrupt JPEG data: premature end of data segment
frame #23: 1056x1920 (6082560 bytes)
Corrupt JPEG data: 605 extraneous bytes before marker 0xd0
frame #24: 1056x1920 (6082560 bytes)
frame #25: 1056x1920 (6082560 bytes)
Corrupt JPEG data: premature end of data segment
frame #26: 1056x1920 (6082560 bytes)
Corrupt JPEG data: premature end of data segment
frame #27: 1056x1920 (6082560 bytes)
Corrupt JPEG data: 721 extraneous bytes before marker 0xd0
frame #28: 1056x1920 (6082560 bytes)
frame #29: 1056x1920 (6082560 bytes)
Corrupt JPEG data: premature end of data segment
frame #30: 1056x1920 (6082560 bytes)
Corrupt JPEG data: premature end of data segment
frame #31: 1056x1920 (6082560 bytes)
Corrupt JPEG data: 396 extraneous bytes before marker 0xd0
frame #32: 1056x1920 (6082560 bytes)
Corrupt JPEG data: 229 extraneous bytes before marker 0xd0
frame #33: 1056x1920 (6082560 bytes)
Corrupt JPEG data: premature end of data segment
frame #34: 1056x1920 (6082560 bytes)
^C
pi@raspberrypi:/ssd/realsense_id/RealSenseID/build/bin $
Dmesg shows unknown video format
pi@raspberrypi:/ssd/realsense_id/RealSenseID/build/bin $ dmesg | grep video
[ 0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=HDMI-A-1:1280x720M@60 smsc95xx.macaddr=E4:5F:01:3C:A1:34 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=tty1 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
[ 4.961594] videodev: Linux video capture interface: v2.00
[ 5.056335] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video13
[ 5.057025] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video14
[ 5.057568] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video15
[ 5.058301] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video16
[ 5.058660] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[ 5.075795] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[ 5.089718] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[ 12.832365] uvcvideo: Unknown video format 41414270-0000-0010-8000-00aa00389b71
[ 12.832383] uvcvideo: Found UVC 1.10 device Intel F450 (2aad:6373)
[ 13.048742] usbcore: registered new interface driver uvcvideo
Any idea what is the right configuration for the video format? I have not made any changes to the sample programs. All configurations are default.
Libuvc is downloaded from here, compiled from source and installed.
As for libusb, got it from sudo apt-get install libusb-1.0-0-dev.
Appreciate any advise I can get.
-
Hello Margaret,
Thank you for contacting us.
We also see the same message "Corrupted JPEG data" when running it on Raspberry Pi 4. But the "Corrupted JPEG data" does not appear when running it on Ubuntu18. We are still looking into this.
Sincerely,
Zulkifli Halim
Intel Customer Support
-
Hello Margaret Lee,
As I spoke with the dev team, this is probably because the RealSenseID is not tested/supported on Raspberry Pi 4. It is only tested on Ubuntu 18, Windows 10, and Android 6. See here: https://dev.intelrealsense.com/docs/sample-code-for-intel-realsense-id-solution.
Sincerely,
Zulkifli Halim
Intel Customer Support -
Hi Zulkifli,
I was referring to a few recent threads which indicated that the F455 works with Raspberry Pi 4.
I thought that Raspberry Pi would have been an easy platform to start with if we want to try integrate F544 as an edge device. The F450 is market for integration into other custom (embedded) design, which most likely will not run Windows or Ubuntu 18.
Would appreciate any help that I can get.
-
Hi Zulkifli,
Do you have any response to the questions raised by Margaret above?
Those posts attached indicate that F455 should works with Raspberry Pi 4. Those communication were previously handled by Yu-Chern Peh and you may want to reach out to her to get more information.
Appreciate your reply and guidance for us to move on.
Thank you very much
Best regards,
EW Chan
-
Hi Zulkifli,
Raspberry Pi 4 Model B does not boot with Ubuntu 18. I tried Ubuntu 21.04 instead but there is a known issue on the virtual serial driver issue (https://bugzilla.kernel.org/show_bug.cgi?id=212751) on this version of the kernel, causing the rsid-cli to return serial port IO error when it executes.
The same "uvcvideo: Unknown video format" error is there as well on this version. Since this affect only the "preview" features of the rsid-cli, I can still proceed without it, operating only from the command line.
Thank you for your support.
Regards,
Margaret
-
Hi Margaret and Zulkifli,
I have exactly the same problem. My solution, for now, is to use the OpenCV capture object to get the image preview. I tried to increase the capture device resolution to the original (1080), and it slows down the frame rate, although the video stream does not present errors. So, the point is to keep a low resolution (OpenCV default) and then adapt the coordinates frame to achieve the correct geometrical match to the (e.g.) detecting rectangle.
Best Regards,
Pedro
Please sign in to leave a comment.
Comments
11 comments