Package boofcv.alg.interpolate
Class InterpolatePixelDistortS<T extends boofcv.struct.image.ImageGray<T>>
- java.lang.Object
-
- boofcv.alg.interpolate.InterpolatePixelDistortS<T>
-
- All Implemented Interfaces:
InterpolatePixel<T>,InterpolatePixelS<T>
public class InterpolatePixelDistortS<T extends boofcv.struct.image.ImageGray<T>> extends java.lang.Object implements InterpolatePixelS<T>
Applies distortion to a coordinate then samples the image with interpolation.
-
-
Field Summary
Fields Modifier and Type Field Description protected boofcv.struct.distort.Point2Transform2_F32distorterprotected InterpolatePixelS<T>interpolate
-
Constructor Summary
Constructors Constructor Description InterpolatePixelDistortS(InterpolatePixelS<T> interpolate, boofcv.struct.distort.Point2Transform2_F32 distorter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InterpolatePixelS<T>copy()Creates a new instance of this interpolation methodfloatget(float x, float y)Returns the interpolated pixel value at the specified location while checking to see if border conditions apply.floatget_fast(float x, float y)Returns the interpolated pixel value at the specified location while assuming it is inside the image far away from the border.boofcv.struct.border.ImageBorder<T>getBorder()Returns the class which handles the image borderboofcv.struct.distort.Point2Transform2_F32getDistorter()intgetFastBorderX()Border around the image that fast interpolation cannot be called.intgetFastBorderY()Border around the image that fast interpolation cannot be called.TgetImage()Returns the image which is being interpolated.boofcv.struct.image.ImageType<T>getImageType()Type of image it can processInterpolatePixelS<T>getInterpolate()booleanisInFastBounds(float x, float y)Is the requested pixel inside the image boundary for which fast unsafe interpolation can be performed.voidsetBorder(boofcv.struct.border.ImageBorder<T> border)Set's the class used to "read" pixels outside the image border.voidsetImage(T image)Change the image that is being interpolated.
-
-
-
Field Detail
-
interpolate
protected InterpolatePixelS<T extends boofcv.struct.image.ImageGray<T>> interpolate
-
distorter
protected boofcv.struct.distort.Point2Transform2_F32 distorter
-
-
Constructor Detail
-
InterpolatePixelDistortS
public InterpolatePixelDistortS(InterpolatePixelS<T> interpolate, boofcv.struct.distort.Point2Transform2_F32 distorter)
-
-
Method Detail
-
get
public float get(float x, float y)Description copied from interface:InterpolatePixelSReturns the interpolated pixel value at the specified location while checking to see if border conditions apply. If the requested pixel is outside the image border it will attempt to process it using or throw a null pointer exception of a border handler has not been specified.- Specified by:
getin interfaceInterpolatePixelS<T extends boofcv.struct.image.ImageGray<T>>- Parameters:
x- Point's x-coordinate. x ≥ 0 && x < image.width or all values if border specifiedy- Point's y-coordinate. y ≥ 0 && y < image.height or all values if border specified- Returns:
- Interpolated intensity value or NaN if it can't be interpolated.
-
get_fast
public float get_fast(float x, float y)Description copied from interface:InterpolatePixelSReturns the interpolated pixel value at the specified location while assuming it is inside the image far away from the border. For any input pointInterpolatePixel.isInFastBounds(float, float)should return true.- Specified by:
get_fastin interfaceInterpolatePixelS<T extends boofcv.struct.image.ImageGray<T>>- Parameters:
x- Point's x-coordinate.y- Point's y-coordinate.- Returns:
- Interpolated intensity value.
-
copy
public InterpolatePixelS<T> copy()
Description copied from interface:InterpolatePixelSCreates a new instance of this interpolation method- Specified by:
copyin interfaceInterpolatePixel<T extends boofcv.struct.image.ImageGray<T>>- Specified by:
copyin interfaceInterpolatePixelS<T extends boofcv.struct.image.ImageGray<T>>
-
setBorder
public void setBorder(boofcv.struct.border.ImageBorder<T> border)
Description copied from interface:InterpolatePixelSet's the class used to "read" pixels outside the image border.- Specified by:
setBorderin interfaceInterpolatePixel<T extends boofcv.struct.image.ImageGray<T>>- Parameters:
border- Class for reading outside the image border
-
getBorder
public boofcv.struct.border.ImageBorder<T> getBorder()
Description copied from interface:InterpolatePixelReturns the class which handles the image border- Specified by:
getBorderin interfaceInterpolatePixel<T extends boofcv.struct.image.ImageGray<T>>
-
setImage
public void setImage(T image)
Description copied from interface:InterpolatePixelChange the image that is being interpolated.- Specified by:
setImagein interfaceInterpolatePixel<T extends boofcv.struct.image.ImageGray<T>>- Parameters:
image- An image.
-
getImage
public T getImage()
Description copied from interface:InterpolatePixelReturns the image which is being interpolated.- Specified by:
getImagein interfaceInterpolatePixel<T extends boofcv.struct.image.ImageGray<T>>- Returns:
- A reference to the image being interpolated.
-
isInFastBounds
public boolean isInFastBounds(float x, float y)Description copied from interface:InterpolatePixelIs the requested pixel inside the image boundary for which fast unsafe interpolation can be performed.- Specified by:
isInFastBoundsin interfaceInterpolatePixel<T extends boofcv.struct.image.ImageGray<T>>- Parameters:
x- Point's x-coordinate.y- Point's y-coordinate.- Returns:
- true if get_fast() can be called.
-
getFastBorderX
public int getFastBorderX()
Description copied from interface:InterpolatePixelBorder around the image that fast interpolation cannot be called.- Specified by:
getFastBorderXin interfaceInterpolatePixel<T extends boofcv.struct.image.ImageGray<T>>- Returns:
- Border size in pixels
-
getFastBorderY
public int getFastBorderY()
Description copied from interface:InterpolatePixelBorder around the image that fast interpolation cannot be called.- Specified by:
getFastBorderYin interfaceInterpolatePixel<T extends boofcv.struct.image.ImageGray<T>>- Returns:
- Border size in pixels
-
getImageType
public boofcv.struct.image.ImageType<T> getImageType()
Description copied from interface:InterpolatePixelType of image it can process- Specified by:
getImageTypein interfaceInterpolatePixel<T extends boofcv.struct.image.ImageGray<T>>
-
getInterpolate
public InterpolatePixelS<T> getInterpolate()
-
getDistorter
public boofcv.struct.distort.Point2Transform2_F32 getDistorter()
-
-