uk.ac.ed.inf.sdp2012.group7.vision
Class DistortionFix
java.lang.Object
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
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 |
DistortionFix
public DistortionFix()
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 correctleft
- Left bufferright
- Right buffertop
- Top bufferbottom
- 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