Solved

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

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now