Solved

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

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

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

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
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 third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

627 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