Reputation: 174
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!
Upvotes: 4
Views: 7089
Reputation: 4597
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");
Upvotes: 0
Reputation: 4243
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.
Upvotes: 3