I want to take a snapshot with my webcam using java and save it to a jpg file. What are the steps needed to do so? A tutorial would be greatly appreciated.
Greetings,
Burkhard
I want to take a snapshot with my webcam using java and save it to a jpg file. What are the steps needed to do so? A tutorial would be greatly appreciated.
Greetings,
Burkhard
the JMF (Java Media Framework) is a good starting point. However, I did not succeed with it.
I finally found the solution here.
The important part being:
Try webcam-capture project.
This code will take a snapshot from webcam (embedded, connected to USB or IP camera) and save it into JPG file:
what you are looking for might be the Java Media Framework (JMF). See the Sun Tutorial. I hope that helps.
I prefer using JMyron instead of JMF. JMyron is easy to use for accessing webcam. To save the captured image you just need to save the BufferedImage using ImageIO.write(); this blog post How To Use Webcam Using Javais usefull to start using JMyron.