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


Java NIVision类代码示例

本文整理汇总了Java中edu.wpi.first.wpilibj.image.NIVision的典型用法代码示例。如果您正苦于以下问题:Java NIVision类的具体用法?Java NIVision怎么用?Java NIVision使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: scoreAspectRatio

import edu.wpi.first.wpilibj.image.NIVision; //导入依赖的package包/类
/**
 * Computes a score (0-100) comparing the aspect ratio to the ideal aspect
 * ratio for the target. This method uses the equivalent rectangle sides to
 * determine aspect ratio as it performs better as the target gets skewed by
 * moving to the left or right. The equivalent rectangle is the rectangle
 * with sides x and y where particle area= x*y and particle perimeter= 2x+2y
 *
 * @param image The image containing the particle to score, needed to
 * performa additional measurements
 * @param report The Particle Analysis Report for the particle, used for the
 * width, height, and particle number
 * @param outer	Indicates whether the particle aspect ratio should be
 * compared to the ratio for the inner target or the outer
 * @return The aspect ratio score (0-100)
 */
public static double scoreAspectRatio(BinaryImage image, ParticleAnalysisReport report, int particleNumber, boolean outer) throws NIVisionException {
    double rectLong, rectShort, aspectRatio, idealAspectRatio;

    rectLong = NIVision.MeasureParticle(image.image, particleNumber, false, NIVision.MeasurementType.IMAQ_MT_EQUIVALENT_RECT_LONG_SIDE);
    rectShort = NIVision.MeasureParticle(image.image, particleNumber, false, NIVision.MeasurementType.IMAQ_MT_EQUIVALENT_RECT_SHORT_SIDE);
    //idealAspectRatio = outer ? (62/29) : (62/20);	//Dimensions of goal opening + 4 inches on all 4 sides for reflective tape
    idealAspectRatio = outer ? (43 / 32) : (39 / 28);
    //Divide width by height to measure aspect ratio
    aspectRatio = report.boundingRectWidth / (double) report.boundingRectHeight;
    /*if(report.boundingRectWidth > report.boundingRectHeight){
     //particle is wider than it is tall, divide long by short
     aspectRatio = 100*(1-Math.abs((1-((rectLong/rectShort)/idealAspectRatio))));
     } else {
     //particle is taller than it is wide, divide short by long
     aspectRatio = 100*(1-Math.abs((1-((rectShort/rectLong)/idealAspectRatio))));
     }*/
    return aspectRatio;
    //return (Math.max(0, Math.min(aspectRatio, 100.0)));		//force to be in range 0-100
}
 
开发者ID:OASTEM,项目名称:2014CataBot,代码行数:35,代码来源:ImagingUtils.java

示例2: scoreXEdge

import edu.wpi.first.wpilibj.image.NIVision; //导入依赖的package包/类
/**
 * Computes a score based on the match between a template profile and the
 * particle profile in the X direction. This method uses the the column
 * averages and the profile defined at the top of the sample to look for the
 * solid vertical edges with a hollow center.
 *
 * @param image The image to use, should be the image before the convex hull
 * is performed
 * @param report The Particle Analysis Report for the particle
 *
 * @return The X Edge Score (0-100)
 */
public static double scoreXEdge(BinaryImage image, ParticleAnalysisReport report) throws NIVisionException {
    double total = 0;
    LinearAverages averages;

    NIVision.Rect rect = new NIVision.Rect(report.boundingRectTop, report.boundingRectLeft, report.boundingRectHeight, report.boundingRectWidth);
    averages = NIVision.getLinearAverages(image.image, LinearAverages.LinearAveragesMode.IMAQ_COLUMN_AVERAGES, rect);
    float columnAverages[] = averages.getColumnAverages();
    for (int i = 0; i < (columnAverages.length); i++) {
        if (xMin[(i * (XMINSIZE - 1) / columnAverages.length)] < columnAverages[i]
                && columnAverages[i] < xMax[i * (XMAXSIZE - 1) / columnAverages.length]) {
            total++;
        }
    }
    total = 100 * total / (columnAverages.length);
    return total;
}
 
开发者ID:OASTEM,项目名称:2014CataBot,代码行数:29,代码来源:ImagingUtils.java

示例3: scoreYEdge

import edu.wpi.first.wpilibj.image.NIVision; //导入依赖的package包/类
/**
 * Computes a score based on the match between a template profile and the
 * particle profile in the Y direction. This method uses the the row
 * averages and the profile defined at the top of the sample to look for the
 * solid horizontal edges with a hollow center
 *
 * @param image The image to use, should be the image before the convex hull
 * is performed
 * @param report The Particle Analysis Report for the particle
 *
 * @return The Y Edge score (0-100)
 *
 */
public static double scoreYEdge(BinaryImage image, ParticleAnalysisReport report) throws NIVisionException {
    double total = 0;
    LinearAverages averages;

    NIVision.Rect rect = new NIVision.Rect(report.boundingRectTop, report.boundingRectLeft, report.boundingRectHeight, report.boundingRectWidth);
    averages = NIVision.getLinearAverages(image.image, LinearAverages.LinearAveragesMode.IMAQ_ROW_AVERAGES, rect);
    float rowAverages[] = averages.getRowAverages();
    for (int i = 0; i < (rowAverages.length); i++) {
        if (yMin[(i * (YMINSIZE - 1) / rowAverages.length)] < rowAverages[i]
                && rowAverages[i] < yMax[i * (YMAXSIZE - 1) / rowAverages.length]) {
            total++;
        }
    }
    total = 100 * total / (rowAverages.length);
    return total;
}
 
开发者ID:OASTEM,项目名称:2014CataBot,代码行数:30,代码来源:ImagingUtils.java

示例4: scoreAspectRatio

import edu.wpi.first.wpilibj.image.NIVision; //导入依赖的package包/类
/**
 * Computes a score (0-100) comparing the aspect ratio to the ideal aspect
 * ratio for the target. This method uses the equivalent rectangle sides to
 * determine aspect ratio as it performs better as the target gets skewed by
 * moving to the left or right. The equivalent rectangle is the rectangle
 * with sides x and y where particle area, xy and particle perimeter, 2x+2y
 *
 * @param image The image containing the particle to score, needed to
 * perform additional measurements
 * @param report The Particle Analysis Report for the particle, used for the
 * width, height, and particle number
 * @param outer Indicates whether the particle aspect ratio should be
 * compared to the ratio for the inner target or the outer
 * @return The aspect ratio score (0-100)
 */
private double scoreAspectRatio(BinaryImage image, ParticleAnalysisReport 
        report, int particleNumber, boolean vertical) throws 
        NIVisionException {
    
    double rectLong, rectShort, aspectRatio, idealAspectRatio;

    rectLong = NIVision.MeasureParticle(image.image, particleNumber, false, 
            MeasurementType.IMAQ_MT_EQUIVALENT_RECT_LONG_SIDE);
    rectShort = NIVision.MeasureParticle(image.image, particleNumber, false, 
            MeasurementType.IMAQ_MT_EQUIVALENT_RECT_SHORT_SIDE);
    idealAspectRatio = vertical ? (4.0 / 32) : (23.5 / 4);
    
    if (report.boundingRectWidth > report.boundingRectHeight) {
        aspectRatio = ratioToScore((rectLong / rectShort)/idealAspectRatio);
    } else {
        aspectRatio = ratioToScore((rectShort / rectLong)/idealAspectRatio);
    }
    return aspectRatio;
}
 
开发者ID:bethpage-robotics,项目名称:Aerial-Assist,代码行数:35,代码来源:AxisCameraM1101.java

示例5: scoreAspectRatio

import edu.wpi.first.wpilibj.image.NIVision; //导入依赖的package包/类
public double scoreAspectRatio(BinaryImage image, ParticleAnalysisReport report, int particleNumber, boolean vertical) throws NIVisionException
   {
       double rectLong, rectShort, aspectRatio, idealAspectRatio;

       rectLong = NIVision.MeasureParticle(image.image, particleNumber, false, NIVision.MeasurementType.IMAQ_MT_EQUIVALENT_RECT_LONG_SIDE);
       rectShort = NIVision.MeasureParticle(image.image, particleNumber, false, NIVision.MeasurementType.IMAQ_MT_EQUIVALENT_RECT_SHORT_SIDE);
       idealAspectRatio = vertical ? (4.0/32) : (23.5/4);	//Vertical reflector 4" wide x 32" tall, horizontal 23.5" wide x 4" tall

       //Divide width by height to measure aspect ratio
       if(report.boundingRectWidth > report.boundingRectHeight){
           //particle is wider than it is tall, divide long by short
           aspectRatio = ratioToScore((rectLong/rectShort)/idealAspectRatio);
       } else {
           //particle is taller than it is wide, divide short by long
           aspectRatio = ratioToScore((rectShort/rectLong)/idealAspectRatio);
       }
return aspectRatio;
   }
 
开发者ID:owatonnarobotics,项目名称:2014RobotCode,代码行数:19,代码来源:CameraDetection.java

示例6: scoreAspectRatio

import edu.wpi.first.wpilibj.image.NIVision; //导入依赖的package包/类
/**
 * Computes a score (0-100) comparing the aspect ratio to the ideal aspect
 * ratio for the target. This method uses the equivalent rectangle sides to
 * determine aspect ratio as it performs better as the target gets skewed by
 * moving to the left or right. The equivalent rectangle is the rectangle
 * with sides x and y where particle area= x*y and particle perimeter= 2x+2y
 *
 * @param image The image containing the particle to score, needed to
 * perform additional measurements
 * @param report The Particle Analysis Report for the particle, used for the
 * width, height, and particle number
 * @param outer	Indicates whether the particle aspect ratio should be
 * compared to the ratio for the inner target or the outer
 * @return The aspect ratio score (0-100)
 */
private static double scoreAspectRatio(BinaryImage image, ParticleAnalysisReport report, int particleNumber, boolean vertical) throws NIVisionException {
    double rectLong, rectShort, aspectRatio, idealAspectRatio;

    rectLong = NIVision.MeasureParticle(image.image, particleNumber, false, NIVision.MeasurementType.IMAQ_MT_EQUIVALENT_RECT_LONG_SIDE);
    rectShort = NIVision.MeasureParticle(image.image, particleNumber, false, NIVision.MeasurementType.IMAQ_MT_EQUIVALENT_RECT_SHORT_SIDE);
    idealAspectRatio = vertical ? (4.0 / 32) : (23.5 / 4);	//Vertical reflector 4" wide x 32" tall, horizontal 23.5" wide x 4" tall

    //Divide width by height to measure aspect ratio
    if (report.boundingRectWidth > report.boundingRectHeight) {
        //particle is wider than it is tall, divide long by short
        aspectRatio = ratioToScore((rectLong / rectShort) / idealAspectRatio);
    } else {
        //particle is taller than it is wide, divide short by long
        aspectRatio = ratioToScore((rectShort / rectLong) / idealAspectRatio);
    }
    return aspectRatio;
}
 
开发者ID:SaratogaMSET,项目名称:649code2014,代码行数:33,代码来源:HotTargetVision.java

示例7: getImages

import edu.wpi.first.wpilibj.image.NIVision; //导入依赖的package包/类
public void getImages(String imageAppend)
{   
    try
    {
        ColorImage image = camera.getImage();
        if(imageWriteLevel >= 1 && imageWriteLevel <= 3)
        {
            NIVision.writeFile(image.image, "/ColorImage" + imageAppend + ".jpg");
            System.out.println("Saving Color Image");
        }
    }
    catch(Throwable t)
    {
        t.printStackTrace();
    }
}
 
开发者ID:wildstang111,项目名称:2014_software,代码行数:17,代码来源:HotGoalDetector.java

示例8: scoreAspectRatio

import edu.wpi.first.wpilibj.image.NIVision; //导入依赖的package包/类
public double scoreAspectRatio(BinaryImage image, ParticleAnalysisReport report, int particleNumber, boolean vertical) throws NIVisionException
{
    double rectLong, rectShort, aspectRatio, idealAspectRatio;

    rectLong = NIVision.MeasureParticle(image.image, particleNumber, false, NIVision.MeasurementType.IMAQ_MT_EQUIVALENT_RECT_LONG_SIDE);
    rectShort = NIVision.MeasureParticle(image.image, particleNumber, false, NIVision.MeasurementType.IMAQ_MT_EQUIVALENT_RECT_SHORT_SIDE);
    idealAspectRatio = vertical ? (4.0 / 32) : (23.5 / 4);	//Vertical reflector 4" wide x 32" tall, horizontal 23.5" wide x 4" tall

    if (report.boundingRectWidth > report.boundingRectHeight)
    {
        aspectRatio = ratioToScore((rectLong / rectShort) / idealAspectRatio);
    }
    else
    {
        aspectRatio = ratioToScore((rectShort / rectLong) / idealAspectRatio);
    }
    return aspectRatio;
}
 
开发者ID:wildstang111,项目名称:2014_software,代码行数:19,代码来源:HotGoalDetector.java

示例9: scoreAspectRatioOnRotatedImage

import edu.wpi.first.wpilibj.image.NIVision; //导入依赖的package包/类
public double scoreAspectRatioOnRotatedImage(BinaryImage image, ParticleAnalysisReport report, int particleNumber, boolean vertical) throws NIVisionException
{
    double rectLong, rectShort, aspectRatio, idealAspectRatio;

    rectLong = NIVision.MeasureParticle(image.image, particleNumber, false, NIVision.MeasurementType.IMAQ_MT_EQUIVALENT_RECT_LONG_SIDE);
    rectShort = NIVision.MeasureParticle(image.image, particleNumber, false, NIVision.MeasurementType.IMAQ_MT_EQUIVALENT_RECT_SHORT_SIDE);
    idealAspectRatio = vertical ? (32.0 / 4) : (4/23.5);	//Vertical reflector 4" wide x 32" tall, horizontal 23.5" wide x 4" tall

    if (report.boundingRectWidth > report.boundingRectHeight)
    {
        aspectRatio = ratioToScore((rectLong / rectShort) / idealAspectRatio);
    }
    else
    {
        aspectRatio = ratioToScore((rectShort / rectLong) / idealAspectRatio);
    }
    return aspectRatio;
}
 
开发者ID:wildstang111,项目名称:2014_software,代码行数:19,代码来源:HotGoalDetector.java

示例10: scoreAspectRatio

import edu.wpi.first.wpilibj.image.NIVision; //导入依赖的package包/类
/**
 * Computes a score (0-100) comparing the aspect ratio to the ideal aspect
 * ratio for the target. This method uses the equivalent rectangle sides to
 * determine aspect ratio as it performs better as the target gets skewed by
 * moving to the left or right. The equivalent rectangle is the rectangle
 * with sides x and y where particle area= x*y and particle perimeter= 2x+2y
 *
 * @param image The image containing the particle to score, needed to
 * perform additional measurements
 * @param report The Particle Analysis Report for the particle, used for the
 * width, height, and particle number
 * @param outer	Indicates whether the particle aspect ratio should be
 * compared to the ratio for the inner target or the outer
 * @return The aspect ratio score (0-100)
 */
private double scoreAspectRatio(BinaryImage image, ParticleAnalysisReport report, int particleNumber, boolean vertical) throws NIVisionException {
    double rectLong, rectShort, aspectRatio, idealAspectRatio;

    rectLong = NIVision.MeasureParticle(image.image, particleNumber, false, NIVision.MeasurementType.IMAQ_MT_EQUIVALENT_RECT_LONG_SIDE);
    rectShort = NIVision.MeasureParticle(image.image, particleNumber, false, NIVision.MeasurementType.IMAQ_MT_EQUIVALENT_RECT_SHORT_SIDE);
    idealAspectRatio = vertical ? (4.0 / 32) : (23.5 / 4);	//Vertical reflector 4" wide x 32" tall, horizontal 23.5" wide x 4" tall

    //Divide width by height to measure aspect ratio
    if (report.boundingRectWidth > report.boundingRectHeight) {
        //particle is wider than it is tall, divide long by short
        aspectRatio = ratioToScore((rectLong / rectShort) / idealAspectRatio);
    } else {
        //particle is taller than it is wide, divide short by long
        aspectRatio = ratioToScore((rectShort / rectLong) / idealAspectRatio);
    }
    return aspectRatio;
}
 
开发者ID:KProskuryakov,项目名称:FRC623Robot2014,代码行数:33,代码来源:VisionController.java

示例11: scoreAspectRatio

import edu.wpi.first.wpilibj.image.NIVision; //导入依赖的package包/类
/**
 * Computes a score (0-100) comparing the aspect ratio to the ideal aspect ratio for the target. This method uses
 * the equivalent rectangle sides to determine aspect ratio as it performs better as the target gets skewed by moving
 * to the left or right. The equivalent rectangle is the rectangle with sides x and y where particle area= x*y
 * and particle perimeter= 2x+2y
 * 
 * @param image The image containing the particle to score, needed to performa additional measurements
 * @param report The Particle Analysis Report for the particle, used for the width, height, and particle number
 * @param outer	Indicates whether the particle aspect ratio should be compared to the ratio for the inner target or the outer
 * @return The aspect ratio score (0-100)
 */
public double scoreAspectRatio(BinaryImage image, ParticleAnalysisReport report, int particleNumber, boolean outer) throws NIVisionException
{
    double rectLong, rectShort, aspectRatio, idealAspectRatio;

    rectLong = NIVision.MeasureParticle(image.image, particleNumber, false, NIVision.MeasurementType.IMAQ_MT_EQUIVALENT_RECT_LONG_SIDE);
    rectShort = NIVision.MeasureParticle(image.image, particleNumber, false, NIVision.MeasurementType.IMAQ_MT_EQUIVALENT_RECT_SHORT_SIDE);
    //idealAspectRatio = outer ? (62/29) : (62/20);	//Dimensions of goal opening + 4 inches on all 4 sides for reflective tape

    //yonatan - change back
    idealAspectRatio = outer ? (62/29) : (62/40);	//Dimensions of goal opening + 4 inches on all 4 sides for reflective tape

    //Divide width by height to measure aspect ratio
    if(report.boundingRectWidth > report.boundingRectHeight){
        //particle is wider than it is tall, divide long by short
        aspectRatio = 100*(1-Math.abs((1-((rectLong/rectShort)/idealAspectRatio))));
    } else {
        //particle is taller than it is wide, divide short by long
        aspectRatio = 100*(1-Math.abs((1-((rectShort/rectLong)/idealAspectRatio))));
    }
    return (Math.max(0, Math.min(aspectRatio, 100.0)));		//force to be in range 0-100
}
 
开发者ID:grt192,项目名称:2013ultimate-ascent,代码行数:33,代码来源:GRTVisionTracker.java

示例12: scoreXEdge

import edu.wpi.first.wpilibj.image.NIVision; //导入依赖的package包/类
/**
 * Computes a score based on the match between a template profile and the particle profile in the X direction. This method uses the
 * the column averages and the profile defined at the top of the sample to look for the solid vertical edges with
 * a hollow center.
 * 
 * @param image The image to use, should be the image before the convex hull is performed
 * @param report The Particle Analysis Report for the particle
 * 
 * @return The X Edge Score (0-100)
 */
public double scoreXEdge(BinaryImage image, ParticleAnalysisReport report) throws NIVisionException
{
    double total = 0;
    LinearAverages averages;

    NIVision.Rect rect = new NIVision.Rect(report.boundingRectTop, report.boundingRectLeft, report.boundingRectHeight, report.boundingRectWidth);
    averages = NIVision.getLinearAverages(image.image, LinearAverages.LinearAveragesMode.IMAQ_COLUMN_AVERAGES, rect);
    float columnAverages[] = averages.getColumnAverages();
    for(int i=0; i < (columnAverages.length); i++){
        if(xMin[(i*(XMINSIZE-1)/columnAverages.length)] < columnAverages[i] 
                && columnAverages[i] < xMax[i*(XMAXSIZE-1)/columnAverages.length]){
            total++;
                }
    }
    total = 100*total/(columnAverages.length);
    return total;
}
 
开发者ID:grt192,项目名称:2013ultimate-ascent,代码行数:28,代码来源:GRTVisionTracker.java

示例13: scoreYEdge

import edu.wpi.first.wpilibj.image.NIVision; //导入依赖的package包/类
/**
 * Computes a score based on the match between a template profile and the particle profile in the Y direction. This method uses the
 * the row averages and the profile defined at the top of the sample to look for the solid horizontal edges with
 * a hollow center
 * 
 * @param image The image to use, should be the image before the convex hull is performed
 * @param report The Particle Analysis Report for the particle
 * 
 * @return The Y Edge score (0-100)
 *
 */
public double scoreYEdge(BinaryImage image, ParticleAnalysisReport report) throws NIVisionException
{
    double total = 0;
    LinearAverages averages;

    NIVision.Rect rect = new NIVision.Rect(report.boundingRectTop, report.boundingRectLeft, report.boundingRectHeight, report.boundingRectWidth);
    averages = NIVision.getLinearAverages(image.image, LinearAverages.LinearAveragesMode.IMAQ_ROW_AVERAGES, rect);
    float rowAverages[] = averages.getRowAverages();
    for(int i=0; i < (rowAverages.length); i++){
        if(yMin[(i*(YMINSIZE-1)/rowAverages.length)] < rowAverages[i] 
                && rowAverages[i] < yMax[i*(YMAXSIZE-1)/rowAverages.length]){
            total++;
                }
    }
    total = 100*total/(rowAverages.length);
    return total;
}
 
开发者ID:grt192,项目名称:2013ultimate-ascent,代码行数:29,代码来源:GRTVisionTracker.java

示例14: scoreAspectRatio

import edu.wpi.first.wpilibj.image.NIVision; //导入依赖的package包/类
/**
    * Computes a score (0-100) comparing the aspect ratio to the ideal aspect ratio for the target. This method uses
    * the equivalent rectangle sides to determine aspect ratio as it performs better as the target gets skewed by moving
    * to the left or right. The equivalent rectangle is the rectangle with sides x and y where particle area= x*y
    * and particle perimeter= 2x+2y
    * 
    * @param image The image containing the particle to score, needed to perform additional measurements
    * @param report The Particle Analysis Report for the particle, used for the width, height, and particle number
    * @param outer	Indicates whether the particle aspect ratio should be compared to the ratio for the inner target or the outer
    * @return The aspect ratio score (0-100)
    */
   public double scoreAspectRatio(BinaryImage image, ParticleAnalysisReport report, int particleNumber, boolean vertical) throws NIVisionException
   {
       double rectLong, rectShort, aspectRatio, idealAspectRatio;

       rectLong = NIVision.MeasureParticle(image.image, particleNumber, false, NIVision.MeasurementType.IMAQ_MT_EQUIVALENT_RECT_LONG_SIDE);
       rectShort = NIVision.MeasureParticle(image.image, particleNumber, false, NIVision.MeasurementType.IMAQ_MT_EQUIVALENT_RECT_SHORT_SIDE);
       idealAspectRatio = vertical ? (4.0/32) : (23.5/4);	//Vertical reflector 4" wide x 32" tall, horizontal 23.5" wide x 4" tall

       //Divide width by height to measure aspect ratio
       if(report.boundingRectWidth > report.boundingRectHeight){
           //particle is wider than it is tall, divide long by short
           aspectRatio = ratioToScore((rectLong/rectShort)/idealAspectRatio);
       } else {
           //particle is taller than it is wide, divide short by long
           aspectRatio = ratioToScore((rectShort/rectLong)/idealAspectRatio);
       }
return aspectRatio;
   }
 
开发者ID:team1482BGHS,项目名称:Team_1482_2013,代码行数:30,代码来源:vision.java

示例15: computeDistance

import edu.wpi.first.wpilibj.image.NIVision; //导入依赖的package包/类
/**
 * Computes the estimated distance to a target using the height of the
 * particle in the image. For more information and graphics showing the math
 * behind this approach see the Vision Processing section of the
 * ScreenStepsLive documentation.
 *
 * @param image The image to use for measuring the particle estimated
 * rectangle.
 * @param report The particle analysis report for the particle.
 * @param outer True if the particle should be treated as an outer target,
 * false to treat it as a center target.
 * @return The estimated distance to the target in inches.
 */
private double computeDistance(BinaryImage image, ParticleAnalysisReport 
        report, int particleNumber) throws NIVisionException {
    double rectLong, height;
    int targetHeight;

    rectLong = NIVision.MeasureParticle(image.image, particleNumber, false, 
            MeasurementType.IMAQ_MT_EQUIVALENT_RECT_LONG_SIDE);
    height = Math.min(report.boundingRectHeight, rectLong);
    targetHeight = 32;

    return Y_IMAGE_RES * targetHeight / (height * 12 * 2 
            * Math.tan(VIEW_ANGLE * Math.PI / (180 * 2)));
}
 
开发者ID:bethpage-robotics,项目名称:Aerial-Assist,代码行数:27,代码来源:AxisCameraM1101.java


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