当前位置: 首页>>代码示例>>Java>>正文


Java WebcamPanel.setFPSDisplayed方法代码示例

本文整理汇总了Java中com.github.sarxos.webcam.WebcamPanel.setFPSDisplayed方法的典型用法代码示例。如果您正苦于以下问题:Java WebcamPanel.setFPSDisplayed方法的具体用法?Java WebcamPanel.setFPSDisplayed怎么用?Java WebcamPanel.setFPSDisplayed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.github.sarxos.webcam.WebcamPanel的用法示例。


在下文中一共展示了WebcamPanel.setFPSDisplayed方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: VideoLlamada

import com.github.sarxos.webcam.WebcamPanel; //导入方法依赖的package包/类
public void VideoLlamada() {
    Webcam webcam = Webcam.getDefault();

    WebcamPanel panel = new WebcamPanel(webcam);
    panel.setFPSDisplayed(true);

    JFrame window = new JFrame("VIDEO CALL");
    window.setTitle("Haciendo videollamada con " + jt_Name_Contacts.getText());

    window.setExtendedState(MAXIMIZED_BOTH);
    panel.setFillArea(true);

    window.add(panel);
    window.pack();
    window.setVisible(true);
}
 
开发者ID:alexycruz1,项目名称:LP_Proyecto,代码行数:17,代码来源:Principal.java

示例2: main

import com.github.sarxos.webcam.WebcamPanel; //导入方法依赖的package包/类
public static void main(String[] args) throws InterruptedException {

		Webcam webcam = Webcam.getDefault();
		webcam.setViewSize(WebcamResolution.VGA.getSize());

		WebcamPanel panel = new WebcamPanel(webcam);
		panel.setFPSDisplayed(true);
//		panel.setDisplayDebugInfo(true);
		panel.setImageSizeDisplayed(true);
		panel.setMirrored(true);

		JFrame window = new JFrame("Test webcam panel");
		window.add(panel);
		window.setResizable(true);
		window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		window.pack();
		window.setVisible(true);
	}
 
开发者ID:cycronix,项目名称:cloudturbine,代码行数:19,代码来源:CTcamera.java

示例3: ma2in

import com.github.sarxos.webcam.WebcamPanel; //导入方法依赖的package包/类
public static void ma2in(String[] args) throws InterruptedException
{

    try {

        IpCamAuth auth = new IpCamAuth("rovguest", "rov");

        IpCamDevice olga = IpCamDeviceRegistry.register("Olga", "http://172.16.65.196:6969/videostream.cgi?loginuse=rovguest&loginpas=rov", IpCamMode.PUSH, auth);
        IpCamDevice alexei = IpCamDeviceRegistry.register("Alexei", "http://172.16.65.197:6969/videostream.cgi?loginuse=rovguest&loginpas=rov", IpCamMode.PUSH, auth);

        olga.setResolution(WebcamResolution.VGA.getSize());
        alexei.setResolution(WebcamResolution.VGA.getSize());

        WebcamPanel panel0 = new WebcamPanel(Webcam.getWebcams().get(0));
        WebcamPanel panel1 = new WebcamPanel(Webcam.getWebcams().get(1));
        panel0.setFPSDisplayed(true);
        panel0.setDisplayDebugInfo(true);
        panel0.setImageSizeDisplayed(true);
        panel1.setFPSDisplayed(true);
        panel1.setDisplayDebugInfo(true);
        panel1.setImageSizeDisplayed(true);

        JFrame window = new JFrame("Test webcam panel");
        window.setLayout(new GridBagLayout());
        window.add(panel0);
        window.add(panel1);
        window.setResizable(true);
        window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        window.pack();
        window.setVisible(true);
    } catch(MalformedURLException ex) {
        Logger.getLogger(Learning.class.getName()).log(Level.SEVERE, null, ex);
    }
}
 
开发者ID:InternationalSchoolBangkok,项目名称:ROV,代码行数:35,代码来源:Learning.java

示例4: run

import com.github.sarxos.webcam.WebcamPanel; //导入方法依赖的package包/类
@Override
public void run() {

	Webcam.addDiscoveryListener(this);

	setTitle("Java Webcam Capture POC");
	setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	setLayout(new BorderLayout());

	addWindowListener(this);

	picker = new WebcamPicker();
	picker.addItemListener(this);

	webcam = picker.getSelectedWebcam();

	if (webcam == null) {
		System.out.println("No webcams found...");
		System.exit(1);
	}

	webcam.setViewSize(WebcamResolution.VGA.getSize());
	webcam.addWebcamListener(camara.this);

	panel = new WebcamPanel(webcam, false);
	panel.setFPSDisplayed(true);

	add(picker, BorderLayout.NORTH);
	add(panel, BorderLayout.CENTER);
           add(boton, BorderLayout.SOUTH);
               
               boton.addActionListener(this);

	pack();
	setVisible(true);

	Thread t = new Thread() {

		@Override
		public void run() {
			panel.start();
		}
	};
	t.setName("example-starter");
	t.setDaemon(true);
	t.setUncaughtExceptionHandler(this);
	t.start();
}
 
开发者ID:ExsonCardona,项目名称:ESIPC,代码行数:49,代码来源:camara.java

示例5: run

import com.github.sarxos.webcam.WebcamPanel; //导入方法依赖的package包/类
@Override
public void run() {
               
	Webcam.addDiscoveryListener(this);

	setTitle("Java Webcam Capture POC");
	setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	setLayout(new BorderLayout());

	addWindowListener(this);
               
	picker = new WebcamPicker();
	picker.addItemListener(this);

	webcam = picker.getSelectedWebcam();

	if (webcam == null) {
		System.out.println("No webcams found...");
		System.exit(1);
	}

	webcam.setViewSize(WebcamResolution.VGA.getSize());
	webcam.addWebcamListener(camara.this);

	panel = new WebcamPanel(webcam, false);
	panel.setFPSDisplayed(true);

	add(picker, BorderLayout.NORTH);         
	add(panel, BorderLayout.CENTER);
               add(boton, BorderLayout.SOUTH);
               add(boton1, BorderLayout.NORTH);
                              
               
               boton.addActionListener(this);
               boton1.addActionListener(this);
                              
	pack();
	setVisible(true);

	Thread t = new Thread() {

		@Override
		public void run() {
			panel.start();
		}
	};
	t.setName("example-starter");
	t.setDaemon(true);
	t.setUncaughtExceptionHandler(this);
	t.start();
          
}
 
开发者ID:ExsonCardona,项目名称:ESIPC,代码行数:53,代码来源:camara.java

示例6: connectCam

import com.github.sarxos.webcam.WebcamPanel; //导入方法依赖的package包/类
private void connectCam() {
    olga = Webcam.getWebcams().get(0);
    olga.setImageTransformer((BufferedImage image) -> {
        int w = image.getWidth();
        int h = image.getHeight();
        BufferedImage modified = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
        Graphics2D g2 = modified.createGraphics();
        g2.drawImage(image, w, h, -w, -h, null);
        g2.dispose();
        modified.flush();
        return modified;
    });
    WebcamPanel subOlga = new WebcamPanel(olga);
    subOlga.setFPSDisplayed(true);
    subOlga.setDisplayDebugInfo(true);
    subOlga.setFPSLimit(60);
    olgaPanel.removeAll();
    olgaPanel.add(subOlga);
    olgaPanel.revalidate();
    olgaPanel.repaint();

    alexei = Webcam.getWebcams().get(1);
    WebcamPanel subAlexei = new WebcamPanel(alexei);
    subAlexei.setFPSDisplayed(true);
    subAlexei.setDisplayDebugInfo(true);
    subAlexei.setFPSLimit(60);
    alexeiPanel.removeAll();
    alexeiPanel.add(subAlexei);
    alexeiPanel.revalidate();
    alexeiPanel.repaint();

    maria = Webcam.getWebcams().get(2);
    WebcamPanel subMaria = new WebcamPanel(maria);
    subMaria.setFPSDisplayed(true);
    subMaria.setDisplayDebugInfo(true);
    subMaria.setFPSLimit(60);
    mariaPanel.removeAll();
    mariaPanel.add(subMaria);
    mariaPanel.revalidate();
    mariaPanel.repaint();

    pack();
}
 
开发者ID:InternationalSchoolBangkok,项目名称:ROV,代码行数:44,代码来源:Display.java

示例7: connectCam

import com.github.sarxos.webcam.WebcamPanel; //导入方法依赖的package包/类
private void connectCam()
{
    olga = Webcam.getWebcams().get(0);
    olga.setImageTransformer(new WebcamImageTransformer()
    {
        @Override
        public BufferedImage transform(BufferedImage image)
        {
            int w = image.getWidth();
            int h = image.getHeight();
            BufferedImage modified = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
            Graphics2D g2 = modified.createGraphics();
            g2.drawImage(image, w, h, -w, -h, null);
            g2.dispose();
            modified.flush();
            return modified;
        }
    });
    WebcamPanel subOlga = new WebcamPanel(olga);
    subOlga.setFPSDisplayed(true);
    subOlga.setDisplayDebugInfo(true);
    subOlga.setFPSLimit(60);
    olgaPanel.removeAll();
    olgaPanel.add(subOlga);
    olgaPanel.revalidate();
    olgaPanel.repaint();

    alexei = Webcam.getWebcams().get(1);
    WebcamPanel subAlexei = new WebcamPanel(alexei);
    subAlexei.setFPSDisplayed(true);
    subAlexei.setDisplayDebugInfo(true);
    subAlexei.setFPSLimit(60);
    alexeiPanel.removeAll();
    alexeiPanel.add(subAlexei);
    alexeiPanel.revalidate();
    alexeiPanel.repaint();

    maria = Webcam.getWebcams().get(2);
    WebcamPanel subMaria = new WebcamPanel(maria);
    subMaria.setFPSDisplayed(true);
    subMaria.setDisplayDebugInfo(true);
    subMaria.setFPSLimit(60);
    mariaPanel.removeAll();
    mariaPanel.add(subMaria);
    mariaPanel.revalidate();
    mariaPanel.repaint();

    pack();
}
 
开发者ID:InternationalSchoolBangkok,项目名称:ROV,代码行数:50,代码来源:Display.java


注:本文中的com.github.sarxos.webcam.WebcamPanel.setFPSDisplayed方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。