java:web cam application

浪子不回头ぞ 提交于 2019-12-09 19:56:41

问题


I am looking to do develop the following application. How to proceed?

  1. Scan the system for installed webcams and their supported video modes.
  2. Let the user select a cam and a video mode.
  3. Displays a video of the camera.
  4. Starts a frame grabber/processor, it doesn't have to do nothing for now. I want to have the possibility to elaborate frames or at least one frame every x.
  5. Not sure if it's possible but i'd need also a routine to overlay processed frames on the playing video.

回答1:


Check this post on SO for inspiration.

The JMF framework supports capturing real-time data, audio or video, as detailed in this article




回答2:


You can also try LTI-Civil




回答3:


I would recommend you using Webcam Capture project since neither JMF nor LTI-CIVIL are maintained any more. Webcam capture is a cross-platform, open source project hosted on Github. There are plenty of examples, e.g. of how to do things you've asked:

  • How to enumerate webcams and listen for new devices connected
  • Display video from camera
  • Enable grabbing and take snapshot on demand

Unfortunately there is no possibility to overlay image obtained thru Webcam Capture API on the playing video. At least not within the Webcam Capture itself, but you could use Xuggler to do that - it contains example of how this can be done.

Please note that Webcam Capture API can be used on top of the JMF, FMJ, LTI-CIVIL, GStreamer, OpenIMAJ and other.



来源:https://stackoverflow.com/questions/1570518/javaweb-cam-application

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!