简体   繁体   中英

Simplest way to take a webcam picture using java

I'm making a program in java. I'd like to be able to take pictures from the client's webcam. I've been looking around, i found some APIs, but i can't really make heads of tails of what I downloaded. Anyone know a really simple way to take pictures in java? Thanks a lot!

Well, I would go with JMF or FMJ , they seem to be the big names in this sort of thing. There is a somewhat-similar question here that contains a few more options, if both of those are a little too "heavy" for you. It might be worth it to give one of them a shot.

EDIT: JMyron might be what you're looking for, according to this answer .

It's very simple to do it using Marvin :

MarvinVideoInterface videoAdapter = new MarvinJavaCVAdapter();
videoAdapter.connect(0);
MarvinImage image = videoAdapter.getFrame();
MarvinImageIO.saveImage(image, "./res/webcam_picture.jpg");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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