Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Capture high-resolution image snapshots from webcam, in Java

Anyone knows a Java library which can be used for the purpose of capturing high-resolution image snapshots from a webcam?

More precisely: - Detect the available webcams (laptops may have a built-in one and an external one attached trough an USB connection) - Choose a webcam to work with. - Detect available resolutions for IMAGE capture (ex: up to 1280x1024 for a web camera with 1.3 Mp sensor). They are generally much greater than the for VIDEO capture (ex: up to 640x480 for the same web camera). - Choose a resolution to work with. - On request (calling an API function), capture a snapshot from the selected camera with the selected resolution.

I've tried: - JMF: sucks, doesn't support automatic detection of attached web cameras. - FMJ: uses LTI-CIVIL for webcam support. - LTI-CIVIL: only supports VIDEO capture. The code is also very old (2007 if i remember correctly). Uses native libraries written in C++ for webcam access. DirectX for Windows and Video4Linux for (obviously, ) Linux. But looking over the C++ code, it becomes obvious that it's oriented towards video streaming which is not my purpose (as reflected in the description of what i need)

I would be thankful if anyone could point me to a Java library which fits the profile i need.

Thanks.

like image 283
Michael Avatar asked Oct 24 '22 06:10

Michael


1 Answers

openCV is a popular C++ computer vision library. However, they have Java bindings as well. http://code.google.com/p/javacv/

OpenCV lets u access to image and video processing and capturing of image and video from multiple webcams as well.

like image 183
Nick Avatar answered Nov 13 '22 01:11

Nick