001 /*----------------------------------------------------------------------------*/ 002 /* Copyright (c) FIRST 2008-2012. All Rights Reserved. */ 003 /* Open Source Software - may be modified and shared by FRC teams. The code */ 004 /* must be accompanied by the FIRST BSD license file in the root directory of */ 005 /* the project. */ 006 /*----------------------------------------------------------------------------*/ 007 package edu.wpi.first.wpilibj.image; 008 009 /** 010 * A grey scale image represented at a byte per pixel. 011 * @author dtjones 012 */ 013 public class MonoImage extends Image { 014 015 /** 016 * Create a new 0x0 image. 017 */ 018 public MonoImage() throws NIVisionException { 019 super(NIVision.ImageType.imaqImageU8); 020 } 021 022 MonoImage(MonoImage sourceImage) { 023 super(sourceImage); 024 } 025 026 public EllipseMatch[] detectEllipses(EllipseDescriptor ellipseDescriptor, 027 CurveOptions curveOptions, ShapeDetectionOptions shapeDetectionOptions, 028 RegionOfInterest roi) throws NIVisionException { 029 return NIVision.detectEllipses(this, ellipseDescriptor, curveOptions, shapeDetectionOptions, roi); 030 } 031 032 public EllipseMatch[] detectEllipses(EllipseDescriptor ellipseDescriptor) 033 throws NIVisionException { 034 return NIVision.detectEllipses(this, ellipseDescriptor, null, null, null); 035 } 036 }