繁体   English   中英

无法在Raspberry Pi(Arch Linux)上获取网络摄像头图像

[英]Unable to get webcam image on Raspberry Pi (Arch Linux)

我正在使用Raspberry pi(Arch Linux)来获取带有Java(1.8.0_06)的带有webcam-capture (0.3.9)库的摄像头图像,但是我的应用程序失败并显示以下堆栈跟踪:

11:18:42.578 [main] INFO  c.g.sarxos.webcam.WebcamDriverUtils - Searching driver com.github.sarxos.webcam.ds.openimaj.OpenImajDriver
11:18:42.585 [main] DEBUG c.g.sarxos.webcam.WebcamDriverUtils - Driver com.github.sarxos.webcam.ds.openimaj.OpenImajDriver not found
11:18:42.589 [main] INFO  c.g.sarxos.webcam.WebcamDriverUtils - Searching driver com.github.sarxos.webcam.ds.civil.LtiCivilDriver
11:18:42.595 [main] DEBUG c.g.sarxos.webcam.WebcamDriverUtils - Driver com.github.sarxos.webcam.ds.civil.LtiCivilDriver not found
11:18:42.598 [main] INFO  c.g.sarxos.webcam.WebcamDriverUtils - Searching driver com.github.sarxos.webcam.ds.jmf.JmfDriver
11:18:42.604 [main] DEBUG c.g.sarxos.webcam.WebcamDriverUtils - Driver com.github.sarxos.webcam.ds.jmf.JmfDriver not found
11:18:42.607 [main] INFO  com.github.sarxos.webcam.Webcam - Webcam driver has not been found, default one will be used!
11:18:42.659 [webcam-discovery-service] DEBUG c.g.s.w.d.b.WebcamDefaultDriver - Searching devices
Java HotSpot(TM) Client VM warning: You have loaded library /tmp/BridJExtractedLibraries8835024590982118533/bridj.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
getLibrarySymbols has 141 symbols
11:18:46.381 [webcam-discovery-service] DEBUG c.g.s.w.d.b.WebcamDefaultDriver - Found device HP Webcam GJ502AA /dev/video0
11:18:46.439 [main] DEBUG com.github.sarxos.webcam.Webcam - Setting new resolution 320x240
11:18:46.533 [atomic-processor] INFO  c.g.s.webcam.ds.cgt.WebcamOpenTask - Opening webcam HP Webcam GJ502AA /dev/video0
11:18:46.536 [atomic-processor] DEBUG c.g.s.w.d.b.WebcamDefaultDevice - Opening webcam device HP Webcam GJ502AA /dev/video0
11:18:46.540 [atomic-processor] DEBUG c.g.s.w.d.b.WebcamDefaultDevice - Webcam device /dev/video0 starting session, size java.awt.Dimension[width=320,height=240]
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xb6e37204, pid=2297, tid=2901406816
#
# JRE version: Java(TM) SE Runtime Environment (8.0_06-b23) (build 1.8.0_06-b23)
# Java VM: Java HotSpot(TM) Client VM (25.6-b23 mixed mode linux-arm )
# Problematic frame:
# C  [libc.so.6+0x79204]  strcpy+0x14
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /root/Downloads/motion-capture/hs_err_pid2297.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
#
Aborted

http://pastebin.com/FB7Z1gvQ

上面的堆栈跟踪(/root/Downloads/motion-capture/hs_err_pid2297.log)中引用的JVM堆日志在这里:

http://pastebin.com/pFNYRk81

请帮忙。

好像您使用的是HP网络摄像头。 您确定要为凸轮安装正确的驱动程序吗? 您可以通过键入以下命令列出您的USB设备:

# lsusb -t

您还可以检查此链接以查看pi上安装的设备驱动程序列表,并确保您是否可以实际看到已安装的相机驱动程序:

http://www.cyberciti.biz/faq/howto-display-list-of-modules-or-device-drivers-in-the-linux-kernel/

由于无法使用webcam-capture (0.3.9)库解决问题,因此我将其转储并通过使用此处定义的示例代码使用xuggler:

https://github.com/artclarke/xuggle-xuggler/blob/master/src/com/xuggle/xuggler/demos/DisplayWebcamVideo.java

要为树莓派编译xuggler,请执行以下操作:

为Raspberry Pi编译Xuggler的指南

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM