Solved

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

Posted on 2004-09-26
3
363 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
  • 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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
java stored proc example 9 45
How do I remove an object from a 3 40
jsp insert to database example 2 47
SequenceInputStream example 3 19
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …

830 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