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


Java NIVision.MeasurementType方法代码示例

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


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

示例1: addCriteria

import com.ni.vision.NIVision; //导入方法依赖的package包/类
public void addCriteria (NIVision.MeasurementType type, float lower,
        float upper, boolean calibrated, boolean exclude)
{
    int calibratedAsInteger;
    if (calibrated == true)
        {
        calibratedAsInteger = 1;
        }
    else
        {
        calibratedAsInteger = 0;
        }
    int excludeAsInteger;
    if (exclude == true)
        {
        excludeAsInteger = 1;
        }
    else
        {
        excludeAsInteger = 0;
        }
    // Create a new criteria object from our arguments
    final ParticleFilterCriteria2 criteria = new ParticleFilterCriteria2(
            type, lower, upper,
            calibratedAsInteger, excludeAsInteger);
    // Create a new criteria array, the size of our old array + 1 to
    // accomodate the new one
    final ParticleFilterCriteria2[] tempCriteria = new ParticleFilterCriteria2[this.criteriaArray.length
            + 1];
    // Copy the old criteria array into our new one
    System.arraycopy(this.criteriaArray, 0, tempCriteria, 0,
            this.criteriaArray.length);
    // set the last value of this new array to the new criteria
    tempCriteria[tempCriteria.length - 1] = criteria;
    // set the class criteria array to our temporary one that has the new
    // entry
    this.criteriaArray = tempCriteria;
    // this.criteriaCollection.addCriteria(type, lower, upper,
    // outsideRange);
}
 
开发者ID:FIRST-Team-339,项目名称:2017,代码行数:41,代码来源:CriteriaArrayOperator.java

示例2: addCriteria

import com.ni.vision.NIVision; //导入方法依赖的package包/类
public void addCriteria (NIVision.MeasurementType type, float lower,
float upper, boolean calibrated, boolean exclude)
{
int calibratedAsInteger;
if (calibrated == true)
    {
        calibratedAsInteger = 1;
        }
else
    {
        calibratedAsInteger = 0;
        }
int excludeAsInteger;
if (exclude == true)
    {
        excludeAsInteger = 1;
        }
else
    {
        excludeAsInteger = 0;
        }
// Create a new criteria object from our arguments
final ParticleFilterCriteria2 criteria =
    new ParticleFilterCriteria2(type, lower, upper,
            calibratedAsInteger, excludeAsInteger);
// Create a new criteria array, the size of our old array + 1 to
// accomodate the new one
final ParticleFilterCriteria2[] tempCriteria =
    new ParticleFilterCriteria2[this.criteriaArray.length + 1];
// Copy the old criteria array into our new one
System.arraycopy(this.criteriaArray, 0, tempCriteria, 0,
    this.criteriaArray.length);
// set the last value of this new array to the new criteria
tempCriteria[tempCriteria.length - 1] = criteria;
// set the class criteria array to our temporary one that has the new
// entry
this.criteriaArray = tempCriteria;
// this.criteriaCollection.addCriteria(type, lower, upper,
// outsideRange);
}
 
开发者ID:FIRST-Team-339,项目名称:2016,代码行数:41,代码来源:CriteriaArrayOperator.java

示例3: addCriteria

import com.ni.vision.NIVision; //导入方法依赖的package包/类
/**
 * Adds a criteria to our criteria collection that is used
 * to filter the image.
 *
 * @param type
 *            measurement type to use, given from the list of
 *            information that each blob has in NIVision.MeasurementType.
 * @param lower
 *            lower range of this measurement type
 * @param upper
 *            upper range of this measurement type
 * @param exclude
 *            (not sure about this one yet)
 * @param outsideRange
 *            - true if we want to get rid of particles
 *            within the specified range, false if we want those within the
 *            range.
 *
 *            Any blob who's measurement of the given
 *            NIVision.MeasurementType falls outside
 *            of the given range will be removed from the
 *            particleAnalysisReports array.
 * @author Noah Golmant
 * @written 29 May 2014
 */
public void addCriteria (NIVision.MeasurementType type, float lower,
        float upper, int exclude, int outsideRange)
{
    // Create a new criteria object from our arguments
    final ParticleFilterCriteria2 criteria = new ParticleFilterCriteria2(
            type, lower, upper, exclude,
            outsideRange);
    // Create a new criteria array, the size of our old array + 1 to
    // accomodate the new one
    final ParticleFilterCriteria2[] tempCriteria = new ParticleFilterCriteria2[this.criteriaArray.length
            + 1];
    // Copy the old criteria array into our new one
    System.arraycopy(this.criteriaArray, 0, tempCriteria, 0,
            this.criteriaArray.length);
    // set the last value of this new array to the new criteria
    tempCriteria[tempCriteria.length - 1] = criteria;
    // set the class criteria array to our temporary one that has the new
    // entry
    this.criteriaArray = tempCriteria;
    // this.criteriaCollection.addCriteria(type, lower, upper,
    // outsideRange);
}
 
开发者ID:FIRST-Team-339,项目名称:2017,代码行数:48,代码来源:ImageProcessing.java


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