uk.ac.ed.inf.sdp2012.group7.vision
Class DistortionFix

java.lang.Object
  extended by uk.ac.ed.inf.sdp2012.group7.vision.DistortionFix

public class DistortionFix
extends java.lang.Object

Class to remove barrel distortion from bufferedimages

Author:
Rado, James Hulme

Constructor Summary
DistortionFix()
           
 
Method Summary
static java.awt.Point barrelCorrected(java.awt.Point p1)
          Correct for single points Called by the above function, but also called when overlay is turned off
 java.awt.image.BufferedImage removeBarrelDistortion(java.awt.image.BufferedImage image, int left, int right, int top, int bottom)
          Remove barrel distortion on whole image Buffers used so we only correct the pitch area not the useless background area
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistortionFix

public DistortionFix()
Method Detail

removeBarrelDistortion

public java.awt.image.BufferedImage removeBarrelDistortion(java.awt.image.BufferedImage image,
                                                           int left,
                                                           int right,
                                                           int top,
                                                           int bottom)
Remove barrel distortion on whole image Buffers used so we only correct the pitch area not the useless background area

Parameters:
image - Frame to correct
left - Left buffer
right - Right buffer
top - Top buffer
bottom - Bottom buffer
Returns:
A new image with no barrel distortion

barrelCorrected

public static java.awt.Point barrelCorrected(java.awt.Point p1)
Correct for single points Called by the above function, but also called when overlay is turned off

Parameters:
p1 - Point to fix
Returns:
Fixed Point