Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## PER.rover.control
Class VisionUtil

    java.lang.Object
      PER.rover.control.VisionUtil

public class VisionUtil
extends java.lang.Object

Utilities for vision. Primarily conversions of different sorts.

Field Summary
`static int` | `CAMERA_HEIGHT` The height of the camera in cm
`static int` | `FOV_HEIGHT`
`static int` | `FOV_WIDTH`
`static int` | `TRACK_HEIGHT`
`static int` | `TRACK_WIDTH`

Constructor Summary
`VisionUtil()` Creates a new instance of VisionUtil

Method Summary
`static int` | `objectPan(int trackX)` Converts a trackX value into a pan adjustment.
`static int` | `objectTilt(int trackY)` Converts a trackY value into a tilt adjustment.
`static boolean` | `v4l_yuv420p2rgb(byte[] yuv_in, int width, int height, int[] rgb_out)`
`static boolean` | `v4l_yuv420p2yuv(byte[] yuv_in, int width, int height, int[] yuv_out)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### TRACK_WIDTH

    public static final int TRACK_WIDTH

See Also:
  Constant Field Values

### TRACK_HEIGHT

    public static final int TRACK_HEIGHT

See Also:
  Constant Field Values

### FOV_WIDTH

    public static final int FOV_WIDTH

See Also:
  Constant Field Values

### FOV_HEIGHT

    public static final int FOV_HEIGHT

See Also:
  Constant Field Values

### CAMERA_HEIGHT

    public static final int CAMERA_HEIGHT

  The height of the camera in cm

  See Also:
    Constant Field Values

Constructor Detail

### VisionUtil

    public VisionUtil()

  Creates a new instance of VisionUtil

Method Detail

### v4l_yuv420p2rgb

    public static boolean v4l_yuv420p2rgb(byte[] yuv_in,
                                          int width,
                                          int height,
                                          int[] rgb_out)

### v4l_yuv420p2yuv

    public static boolean v4l_yuv420p2yuv(byte[] yuv_in,
                                          int width,
                                          int height,
                                          int[] yuv_out)

### objectPan

    public static int objectPan(int trackX)

  Converts a trackX value into a pan adjustment. To find the real location of an object, take pan + objectPan(trackX)

  Parameters:
    `trackX` - The trackX value from color tracking.
  Returns:
    the amount by which you should adjust the pan.

### objectTilt

    public static int objectTilt(int trackY)

  Converts a trackY value into a tilt adjustment. To find the real location of an object, take tilt + objectTilt(trackY)

  Parameters:
    `trackY` - The trackY value from color tracking.
  Returns:
    the amount by which you should adjust the tilt.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD