Solved

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

Posted on 2004-09-26
3
364 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 14

Expert Comment

by:sudhakar_koundinya
ID: 12155873
0
 
LVL 14

Expert Comment

by:sudhakar_koundinya
ID: 12155881
0
 
LVL 2

Accepted Solution

by:
shah1d1698 earned 125 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ejb stateless example 2 69
servlet and mdb, jms error 1 82
Github api to fetch the number of collaborators in a git repo 1 70
Overriding a method 3 14
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
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…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

752 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