• Post Reply Bookmark Topic Watch Topic
  • New Topic

Take picture using webcam from web browser and store it in folder

 
Lakshmi Narayanan Vasudeva
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

I am working in jsf application, in that one requirement is present. If we click "Take picture" button using webcam from web browser, image has to be captured and displayed in the screen. Finally by clicking save button picture has to be stored either in Database or in File Folder. If any of you has worked in this kindly help me.
 
Tim Holloway
Bartender
Posts: 18408
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Lakshmi!

You didn't say whether either the webcam or the folder were supposed to be on the client machine or the server machine.

Control of devices and reading/writing client files is not possible using web technologies such as JSF. The web server doesn't have access to the local machine's resources.

An applet can do these things, but only if it carries a security signature. Applets, however, aren't well supported. For many years, downloading a large JVM to run an applet was an issue and once bandwidth no longer was a major problem, the scandal over applet security caused a lot of people to turn off browser applet support altogether.

If the webcam and the folder are on the server, it's a lot easier, but you'd need some sort of software that the server code could call to actually command the webcam.
 
Lakshmi Narayanan Vasudeva
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am making Hotel Management Project, Hotel will get the Guest Details like name, address, phone etc. Guest Picture has to be taken by web camera and it has to be stored in the server for future reference.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I predict that the hotel guests are not going to like that; expect pushback from them.

But that doesn't change what Tim said: you need to determine how the web app would interface with the camera. A camera attached to a client machine would need an applet or similar; a camera attached to the server would be of no use (unless the server is located where the picture is being taken - which would be a bad idea); a camera that is attached as an independent IP device to the network needs to be integrated with the server (and via the server with the client).
 
Tim Holloway
Bartender
Posts: 18408
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had a very nice webcam. It was only VGA quality, but the system consisted of a matchbox-sized (!) controller that hooked up to an Ethernet cable, a 5V power supply and up to 2 USB webcam devices.

It was really incredible in that it was very user friendly, contained web, mail, and FTP servers - plus a motion detector - in that little matchbox and cost less than $100 USD. But alas, it died, and there doesn't seem to be anyone making an equivalent these days. :(

However, a lot of modern webcams have WiFi interfaces, so you could put one on the desk and have your webserver operate one via the LAN. The webapp logic would thus consist of an internal network call to the camera to retrieve an image paired with ordinary file storage logic. Fairly simple.

But, like Ulf mentioned, I'd be rather uneasy having my picture taken considering that these days you don't know how such data will be used or by whom.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!