Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Show the webcam video on fullscreen and capture screen when clicked.

Posted on 2004-09-26
3
Medium Priority
?
370 Views
Last Modified: 2012-08-14
Hello experts,

Excuse my bad english, I need to make this java program:


The user will have a PC, his webcam and this program. The program must show on fullscreen his webcam video (his face), then when he push any button, the program must capture the screen and save into a file... so the user will have so many photos as clicks. When the users close the program, he could see all photos taken.

Its important that the user see on fullscreen the webcam input until he push any key or button.

Please, tell me what I need to use, webcam requirements, documentation, examples...(you know, 125 points !!!)

Thank you in advance.
0
Comment
Question by:fdiazlu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
shah1d1698 earned 500 total points
ID: 12166958
I've done a project on handwritten character recognition and did it all in java. In my project I took snaps of handwritten digits, processed the images and passed them to a neural network which mapped images of digits to the desired output.

For my project I used these...You can try too!!!...
 
-> Camera(Vivitar55) to Java interface : Morena 6.1. You will find it at www.gnome.sk
-> Download Morena 6.1 and add it to your program.

Here is an example code to take snaps and display them-

/*****************************************************/

import java.awt.*;
import java.awt.event.*;
import SK.gnome.twain.*;

public class ExampleShow extends Frame
{ Image image;
  public void paint(Graphics g)  
  { if (null!=image)
      g.drawImage(image, 0, 0, this);
  }
 
  WindowListener windowAdapter=new WindowAdapter()
  { public void windowClosing(WindowEvent e)
    { System.exit(0);
    }
  };
 
  public ExampleShow()
  { try
    { addWindowListener(windowAdapter);
      setTitle("ExampleShow Frame Application");
      // Open TWAIN select source dialog box
      // and initialize the source selected by the user.
      TwainSource source=TwainManager.selectSource(null);
      image=Toolkit.getDefaultToolkit().createImage(source);
      // wait for the image to be completed
      MediaTracker tracker=new MediaTracker(this);
      tracker.addImage(image, 0);
      // this is the moment the scanner user interface pops up
      System.err.println("Start loading image ...");
      try
      { tracker.waitForAll();
      }
      catch (InterruptedException e)
      { System.err.println("Image loading was interrupted!");
        e.printStackTrace();
      }
      tracker.removeImage(image);
      System.err.println("Image loaded ...");
      setSize(image.getWidth(this), image.getHeight(this));
      setVisible(true);
      TwainManager.close();
    }
    catch (TwainException e)
    { e.printStackTrace();
    }
  }
 
  public static void main(String[] args)
  { new ExampleShow();
  }
}

/****************************************************/

For tutorial visit:
http://www.gnome.sk/Twain/tutorial/quickstart.html

Good luck..
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question