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


Java NIVisionException.printStackTrace方法代码示例

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


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

示例1: updateImage

import edu.wpi.first.wpilibj.image.NIVisionException; //导入方法依赖的package包/类
/**
 * Captures an image from the camera given to the class.
 */
public void updateImage ()
{
    try
        {
        if (this.camera.freshImage() == true)
            {
            this.currentImage = this.camera.getImage().image;
            this.newImageIsFresh = true;
            }
        else
            {
            this.newImageIsFresh = false;
            }
        }
    catch (final NIVisionException e)
        {
        // Auto-generated catch block
        e.printStackTrace();
        }

}
 
开发者ID:FIRST-Team-339,项目名称:2017,代码行数:25,代码来源:ImageProcessor.java

示例2: updateImage

import edu.wpi.first.wpilibj.image.NIVisionException; //导入方法依赖的package包/类
/**
 * Captures an image from the camera given to the class.
 */
public void updateImage ()
{
    try
        {
        if (this.camera.freshImage() == true)
            {
            this.currentImage = this.camera.getImage().image;
            this.newImageIsFresh = true;
            }
        else
            {
            this.newImageIsFresh = false;
            }
        }// TODO @AHK only process new images
    catch (final NIVisionException e)
        {
        // Auto-generated catch block
        e.printStackTrace();
        }

}
 
开发者ID:FIRST-Team-339,项目名称:2016,代码行数:25,代码来源:ImageProcessor.java

示例3: getTargetType

import edu.wpi.first.wpilibj.image.NIVisionException; //导入方法依赖的package包/类
/**
 * @param particle the blob found in image processing
 * @return target type( Top, Middle)
 * calculates type of target based on width to height ratios
 */
String getTargetType(int particle) {

    String target = "not set";
    try {
        ParticleAnalysisReport report = newFilteredImage.getParticleAnalysisReport(particle);

        int blobWidth = report.boundingRectWidth;
        int blobHeight = report.boundingRectHeight;


        if (blobWidth / blobHeight > (topWidth / topHeight - 1) && blobWidth / blobHeight < (topWidth / topHeight + 1)) {
            target = "Top target";
        } else if (blobWidth / blobHeight > (middleWidth / middleHeight - 1) && blobWidth / blobHeight < (middleWidth / middleHeight + 1)) {
            target = "Middle Target";
        } else {
            target = "Not Top/Middle";
        }
    } catch (NIVisionException ex) {
        ex.printStackTrace();
    }
    return target;

}
 
开发者ID:tglem89,项目名称:2013-code-v2,代码行数:29,代码来源:TestVision.java

示例4: getHSVimage

import edu.wpi.first.wpilibj.image.NIVisionException; //导入方法依赖的package包/类
public BinaryImage getHSVimage(ColorImage image){
    try{
        this.HSVimage = image.thresholdHSV(92, 196, 19, 100, 30, 100);
    } catch (NIVisionException ex) {
        ex.printStackTrace();
    }
    System.out.println("Processed HSV image");
    return this.HSVimage;
}
 
开发者ID:team1482BGHS,项目名称:Team_1482_2013,代码行数:10,代码来源:vision.java

示例5: getRGBimage

import edu.wpi.first.wpilibj.image.NIVisionException; //导入方法依赖的package包/类
public BinaryImage getRGBimage(ColorImage image) {
    try{
        this.RGBimage = image.thresholdRGB(0, 150, 145, 230, 120, 225);
    } catch (NIVisionException ex) {
        ex.printStackTrace();
    }
    System.out.println("Processing RGB image");
    return this.RGBimage;
}
 
开发者ID:team1482BGHS,项目名称:Team_1482_2013,代码行数:10,代码来源:vision.java


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