integration of webcam

integration of webcam

View Answers

January 5, 2009 at 7:01 AM

Hi friend,

import java.awt.*;

import java.applet.*;

import java.net.*;





public class JavaCam extends Applet implements Runnable{



boolean boolean_Debug;

Image image_WebcamImage;

Thread thread_This;

int int_Interval;



public static void main(String args[]) {

System.out.println("Webcam32's JavaCam: V1.1");

}


public void trace(String message) {

if (boolean_Debug){
System.out.println(message);

}

}



public void destroy() {

trace("Applet.destroy() called");

thread_This.stop();

}



public void start() {

trace("Start called");

thread_This.resume();

}



public void stop(){

trace("Stop called");

thread_This.suspend();



}

public void run(){
trace("run(): Thread started!");
while (true){
try{
// Put the refresh thread to sleep for the supplied interval
Thread.sleep(int_Interval*1000);
trace("Flushing image");
// Flush the image in the image buffer so we get a new one
image_WebcamImage.flush();
// Track the image and wait till its loaded
MediaTracker mt = new MediaTracker(this);
mt.addImage(image_WebcamImage, 1);
mt.waitForID(1);
// Repaint the image
repaint();
}
catch (Exception e){
trace("Caught:"+e.toString());
}
}

}

January 5, 2009 at 7:02 AM

public void init() {

String string_Url;

URL url_Webcam;

int int_Port;



boolean_Debug = false;

if (getParameter("Trace") != null) {

boolean_Debug = true;

}


trace("Init called");
string_Url = getParameter("URL");

if (string_Url == null) {
showStatus("No URL for Webcam32 image supplied");
return;

}

try{
int_Interval = Integer.parseInt(getParameter("Interval"));

}

catch (Exception e){


int_Interval = 30;

}

trace("Refresh interval="+int_Interval);



try{

url_Webcam = new URL("logo.jpg");
//url_Webcam = new URL(string_Url);

trace("Target URL="+"logo.jpg".toString());

image_WebcamImage = getImage(url_Webcam);

MediaTracker mt = new MediaTracker(this);

mt.addImage(image_WebcamImage, 1);

mt.waitForID(1);

}



catch(Exception e){

trace("Image get exception:"+e.toString());

showStatus("Problem getting initial image: "+e.toString());

return;

}



thread_This = new Thread(this);

thread_This.suspend();

thread_This.start();



}



public void paint(Graphics g){

trace("paint()");

if (image_WebcamImage != null) {
g.drawImage(image_WebcamImage, 0,0, this);
}
}
}

January 5, 2009 at 7:04 AM

<HTML>
<BODY>
<div align = "center">
<APPLET code="JavaCam.class" width=320 height=240>
<PARAM name="url" value="logo.jpg">
<PARAM name="interval" value="10">
</APPLET>
</div>
</BODY>
</HTML>


----------------------------------------------

Visit for more information:

http://www.roseindia.net/java/example/java/applet/

Thanks.









Related Tutorials/Questions & Answers:
java webcam integration
java webcam integration  Hi Folks, We need some pointers on how to implement webcam integration with our java based application. Our objective is to capture picture and record video through webcame from JSP page. Then save
integration of webcam - Applet
integration of webcam  Hello sir, I have a small problem...() { String string_Url; URL url_Webcam; int int_Port; boolean_Debug..._Webcam = new URL("logo.jpg"); //url_Webcam = new URL(string_Url); trace
Advertisements
how to connect webcam in html
how to connect webcam in html  how to connect webcam in html.emphasized text
Accessing webcam in jsp
Accessing webcam in jsp  Hi Friends, I have to access the webcam through jsp and display the snap in same jsp taken after a click. I am using java media framework but i am not able to detect the device using CaptureDeviceManager
ModuleNotFoundError: No module named 'webcam-streamer'
ModuleNotFoundError: No module named 'webcam-streamer'  Hi, My... named 'webcam-streamer' How to remove the ModuleNotFoundError: No module named 'webcam-streamer' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'webcam-streamer'
ModuleNotFoundError: No module named 'webcam-streamer'  Hi, My... named 'webcam-streamer' How to remove the ModuleNotFoundError: No module named 'webcam-streamer' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'gripit_webcam'
ModuleNotFoundError: No module named 'gripit_webcam'  Hi, My... 'gripit_webcam' How to remove the ModuleNotFoundError: No module named 'gripit_webcam' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'webcam-ftpry'
ModuleNotFoundError: No module named 'webcam-ftpry'  Hi, My Python... 'webcam-ftpry' How to remove the ModuleNotFoundError: No module named 'webcam-ftpry' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'webcam-recorder'
ModuleNotFoundError: No module named 'webcam-recorder'  Hi, My... named 'webcam-recorder' How to remove the ModuleNotFoundError: No module named 'webcam-recorder' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'webcam-ftpry'
ModuleNotFoundError: No module named 'webcam-ftpry'  Hi, My Python... 'webcam-ftpry' How to remove the ModuleNotFoundError: No module named 'webcam-ftpry' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'webcam-recorder'
ModuleNotFoundError: No module named 'webcam-recorder'  Hi, My... named 'webcam-recorder' How to remove the ModuleNotFoundError: No module named 'webcam-recorder' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'django-webcam'
ModuleNotFoundError: No module named 'django-webcam'  Hi, My... 'django-webcam' How to remove the ModuleNotFoundError: No module named 'django-webcam' error? Thanks   Hi, In your python
JMF WebCam detection problem - Framework
JMF WebCam detection problem  Hello friends, I am using JMF to operate my web cam.My usb webcam works perfectly with JMF, I used it in JMStudio... = CaptureDeviceManager.getDeviceList( null ); my USB "webcam" is detected however when i
ModuleNotFoundError: No module named 'clutter-webcam-viewer'
ModuleNotFoundError: No module named 'clutter-webcam-viewer'  Hi...: No module named 'clutter-webcam-viewer' How to remove the ModuleNotFoundError: No module named 'clutter-webcam-viewer' error? Thanks   Hi
ModuleNotFoundError: No module named 'odoo8-addon-hr-webcam'
ModuleNotFoundError: No module named 'odoo8-addon-hr-webcam'  Hi...: No module named 'odoo8-addon-hr-webcam' How to remove the ModuleNotFoundError: No module named 'odoo8-addon-hr-webcam' error? Thanks   Hi
ModuleNotFoundError: No module named 'clutter-webcam-viewer'
ModuleNotFoundError: No module named 'clutter-webcam-viewer'  Hi...: No module named 'clutter-webcam-viewer' How to remove the ModuleNotFoundError: No module named 'clutter-webcam-viewer' error? Thanks   Hi
ModuleNotFoundError: No module named 'django-webcam-photoupload'
ModuleNotFoundError: No module named 'django-webcam-photoupload'  Hi...: No module named 'django-webcam-photoupload' How to remove the ModuleNotFoundError: No module named 'django-webcam-photoupload' error? Thanks  
How to capture picture from webcam using java
How to capture picture from webcam using java  i want catch the image from web-cam using jsp, If anyone knows please answer me
ModuleNotFoundError: No module named 'odoo10-addon-web-widget-image-webcam'
ModuleNotFoundError: No module named 'odoo10-addon-web-widget-image-webcam...: ModuleNotFoundError: No module named 'odoo10-addon-web-widget-image-webcam' How...-webcam' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'odoo10-addon-web-widget-image-webcam'
ModuleNotFoundError: No module named 'odoo10-addon-web-widget-image-webcam...: ModuleNotFoundError: No module named 'odoo10-addon-web-widget-image-webcam' How...-webcam' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'odoo9-addon-web-widget-image-webcam'
ModuleNotFoundError: No module named 'odoo9-addon-web-widget-image-webcam' ...: ModuleNotFoundError: No module named 'odoo9-addon-web-widget-image-webcam' How to remove...-webcam' error? Thanks   Hi, In your python environment you have
ModuleNotFoundError: No module named 'odoo9-addon-web-widget-image-webcam'
ModuleNotFoundError: No module named 'odoo9-addon-web-widget-image-webcam' ...: ModuleNotFoundError: No module named 'odoo9-addon-web-widget-image-webcam' How to remove...-webcam' error? Thanks   Hi, In your python environment you have
how to start intergrated webcam of a laptop without calling its exe file using java only - Java Beginners
how to start intergrated webcam of a laptop without calling its exe file using java only  how to open integrated webcam of a laptop without calling its exe file using java only?.simply what i am asking is that is there any method
Integration Struts Spring Hibernate.
Integration Struts Spring Hibernate.  Integration Struts Spring Hibernate
What is Spring Integration?
What is Spring Integration?  Hi, What is Spring Integration? Thanks
struts hibenate integration - Hibernate
struts hibenate integration  struts hibernate integration
Integration
Integration Libraries
Integration Libraries Java Database Connectivity (JDBC) API Using this API, you can fetch the data from databases, Flat files or Spread sheet. Remote Method Invocation (RMI) (adsbygoogle = window.adsbygoogle || []).push
ModuleNotFoundError: No module named 'Integration'
ModuleNotFoundError: No module named 'Integration'  Hi, My Python... 'Integration' How to remove the ModuleNotFoundError: No module named 'Integration' error? Thanks   Hi, In your python environment
Flex integration tools
Flex integration tools  Hi... I want to know What kind of source code integration tools are available with Flex? please tell me ASAP........ Thanks
spring with hibernate integration
spring with hibernate integration   how can i update and search operations in one method by using multiaction controller
Hibernate Spring Integration
In this section, you will learn how to Integration Hibernate with Spring
Hibernate Struts Integration
In this section, you will learn Hibernate Struts Integration
Enterprise Application Integration - Enterprise Application Integration EAI,EAI,Enterprise Application Integration software
EAI- Enterprise Application Integration Enterprise Application Integration or EAI for short is integration technology. EAI is a buzzword that represents the task of integration of various applications so that they may
Spring3 integration with Struts2
Spring3 integration with Struts2  Hi, How I can Integrate Spring3 with Struts2? Give me full code or a running project. Thanks
Integration of spring with hibernate - Framework
Integration of spring with hibernate  org.hibernate.LazyInitializationException: could not initialize proxy - no Session. This is the error I am getting. I would like to know why we will get this kind of error at all? And like
The Flash JavaScript Integration Kit
The Flash JavaScript Integration Kit       The Flash JavaScript Integration Kit allows for the integration of JavaScript and Flash content and enables JavaScript to invoke ActionScript
hibernate and struts integration in ECLIPSE
hibernate and struts integration in ECLIPSE  hi, I saw the complete tutorial of hibernate in your website... But i found nothing for hibernate and struts integration in ECLIPSE and not using ANT Can any One pls Help..ADS
Version of com.gu>integration-tools_2.11 dependency
List of Version of com.gu>integration-tools_2.11 dependency
Struts - Hibernate Integration
the following link:ADS_TO_REPLACE_2 Struts Hibernate Integration Thanks
spring with hibernate integration
spring with hibernate integration   i want code for update and find operation how can i update and search operations in one method by using multiaction controller?   Please visit the following link: http
struts and hibernate integration
struts and hibernate integration  i want entire for this application using struts and hibernate integration here we have to use 4 tables i.e... the following link: Struts Hibernate Integration
ModuleNotFoundError: No module named 'advoservice-integration'
ModuleNotFoundError: No module named 'advoservice-integration'  Hi...: No module named 'advoservice-integration' How to remove the ModuleNotFoundError: No module named 'advoservice-integration' error? Thanks   
ModuleNotFoundError: No module named 'automation-integration'
ModuleNotFoundError: No module named 'automation-integration'  Hi...: No module named 'automation-integration' How to remove the ModuleNotFoundError: No module named 'automation-integration' error? Thanks   Hi
ModuleNotFoundError: No module named 'automation-integration'
ModuleNotFoundError: No module named 'automation-integration'  Hi...: No module named 'automation-integration' How to remove the ModuleNotFoundError: No module named 'automation-integration' error? Thanks   Hi
ModuleNotFoundError: No module named 'djhcup_integration'
ModuleNotFoundError: No module named 'djhcup_integration'  Hi, My... named 'djhcup_integration' How to remove the ModuleNotFoundError: No module named 'djhcup_integration' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'pulseapi-integration'
ModuleNotFoundError: No module named 'pulseapi-integration'  Hi...: No module named 'pulseapi-integration' How to remove the ModuleNotFoundError: No module named 'pulseapi-integration' error? Thanks   Hi
ModuleNotFoundError: No module named 'pytest-integration'
ModuleNotFoundError: No module named 'pytest-integration'  Hi, My... named 'pytest-integration' How to remove the ModuleNotFoundError: No module named 'pytest-integration' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'tpzm_integration'
ModuleNotFoundError: No module named 'tpzm_integration'  Hi, My... named 'tpzm_integration' How to remove the ModuleNotFoundError: No module named 'tpzm_integration' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'WssPlugin_integration'
ModuleNotFoundError: No module named 'WssPlugin_integration'  Hi...: No module named 'WssPlugin_integration' How to remove the ModuleNotFoundError: No module named 'WssPlugin_integration' error? Thanks   Hi

Ads