从 JavaFx 访问网络摄像头
最新的 JavaFx 版本是否支持流式网络摄像头视频?是否可以通过 fx 中的 JMF 获取它?
Does the latest JavaFx version support streaming webcam video? Is it possible to get it through JMF in fx?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看来你还不能做到这一点,请参阅这篇最近的文章。
然而,似乎有几个使用 JMF 至少能够捕获图像的示例。您也可以尝试 JNA。
It doesn't seem you can do it yet, see e.g. this recent post.
However, there seems to be several examples of using JMF to be able to at least capture an image. You might also try JNA.
距离提出问题已经差不多 7 年了,但仍然没有“原生”JavaFX 支持显示来自网络摄像头的流(据我所知)。
不过,我设法使用 OpenCV 库实现它并显示到
ImageView
中。它可能效率低下,但 OpenCV 也为您提供了处理“流”的可能性。尽管人们可能只想显示流,而不是修改它。Almost 7 years later from when the question was asked and there still isn't 'native' JavaFX support for displaying a stream from a webcam (as far as I am aware).
However I managed to achieve it using the OpenCV library and displaying into an
ImageView
. It's probably inefficient but OpenCV gives you the possibilities of processing the 'stream' too. Although all one might want to do is just display the stream, not modify it.