Jump to content

WebCam Hardware Button Detection

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#1
smithi

smithi

    Newbie

  • Members
  • Pip
  • 9 posts
Hello,
I'm developing an application to capture images from webcam using FMJ.

I would like to capture images on press of snapshot button available on webcam. Is it possible?

Thanks in advance.

#2
GMVResources

GMVResources

    Learning Programmer

  • Members
  • PipPipPip
  • 72 posts
Yes, download a program called HyperCam and then there is a certain button I'm not really sure but I think it is f4 that you click for screenshot.

#3
smithi

smithi

    Newbie

  • Members
  • Pip
  • 9 posts
Thank you for your reply but HyperCam is not useful for me.

Perhaps i didn't explain my problem properly.

I'm not trying to capture my screen.
What i want to do is to take a photo with my webcam by pressing on the button on it.
Then i would like that my Java program displays the photo obtained.

Is it possible for a Java program to detect the hardware button of a webcam?

#4
Sumit1206

Sumit1206

    Newbie

  • Members
  • Pip
  • 1 posts
Hi There,
I am also searching for a solution to a simillar sort of problem. In our case the requirement is to; "capture the camera button click event" in JAVA.
My as of now research in this field says that it is not possible to detect a "physical device button click event" solely thru the JAVA/JMF API []Oracle Forums.
What probably we can do is; let a piece of code written in C/C++/Windows-API detect this kind of events and then we can further call upon our JAVA code with the means of JNI (Java Native Interface) from the native-language piece of code. This might be a probable solution.
I need to try this, and will definitely post in this forum after trying.

Also kindly please share accross anything useful that you come accross in this regard.

Thanks in advance,
Sumit

#5
smithi

smithi

    Newbie

  • Members
  • Pip
  • 9 posts
Hello Sumit1206,
I find the same solution: write C code and the port it in Java with JNI.
Did you find any C library doing something like this?
In my researches I find Avicap32.dll that allows to capture video from a camera but I don't think it can be useful in our case.
Most of the exemples i find was in C# and it isn't useful for me.
Did you already begin to develop the code? How are you doing?
I will go on in my researches and in the developing of the code and I'll share news.
Please do the same.

Thanks