Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Java
Hi i create one project using java swing. i want to take a snap picture using web cam when the button click event get generated.
 
I got some info as JMF is the best way to integrate java with web cam. But i cant have any knowledge in jmf. so please help me friends.
 
if you know another way to integrate java swing with web cam means please inform me.
 
else if you know how to use jmf means please help me... Smile | :)
Posted 18-Jan-11 2:55am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

JMF sucks! It's completely outdated, not maintained any more and terribly complicated. The only good thing I can say about it is the fact it is pretty fast.
 
I'm the author of open source Webcam Capture project available on Github. It s goal is to give users access to build-in or USB connected webcams, same as for network or IP cameras, directly from Java code. You don't need to implement any additional software (as you have to do in case of JMF), it works standalone. It's pretty fast - in my case I was able t stream 250 FPS in BufferedImage objects.
 
The API I provided in Webcam Capture is really simple, there are many examples, so you can start developing your app and don;t care if it will be working on Linux, Windows, or Mac OS. Webcam Capture will run everywhere.
 
Here is a simple code. Assume you have two cameras connected to your PC (but of course, you can have only one).
 
Webcam buildin = Webcam.getWebcams().get(0); // build-in laptop camera
Webcam usb = Webcam.getWebcams().get(1); // usb camera
BufferedImage image1 = buildin.getImage();
BufferedImage image2 = usb.getImage();
// do with image1 and image2 whatever you want
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Hope this[^] will give you an idea.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 350
1 Jochen Arndt 190
2 Richard MacCutchan 135
3 Sergey Alexandrovich Kryukov 130
4 DamithSL 105
0 OriginalGriff 6,045
1 DamithSL 4,601
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,310


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 25 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100