public abstract class ImageDistortBasic<Input extends boofcv.struct.image.ImageBase<Input>,Output extends boofcv.struct.image.ImageBase<Output>,Interpolate extends InterpolatePixel<Input>> extends java.lang.Object implements ImageDistort<Input,Output>
ImageDistort. Computes the distortion from the dst to src image
for each pixel. The dst pixel value is then set to the interpolated value of the src image.| Modifier and Type | Field and Description |
|---|---|
protected Output |
dstImg |
protected boofcv.struct.distort.PixelTransform<georegression.struct.point.Point2D_F32> |
dstToSrc |
protected Interpolate |
interp |
protected boolean |
renderAll |
protected Input |
srcImg |
protected int |
x0 |
protected int |
x1 |
protected int |
y0 |
protected int |
y1 |
| Constructor and Description |
|---|
ImageDistortBasic(Interpolate interp)
Specifies configuration parameters
|
| Modifier and Type | Method and Description |
|---|---|
void |
apply(Input srcImg,
Output dstImg)
Applies the transform to the entire destination image.
|
void |
apply(Input srcImg,
Output dstImg,
boofcv.struct.image.GrayU8 mask)
Applies the transform, but marks pixels in the mask as 1 = inside, 0 = outside.
|
void |
apply(Input srcImg,
Output dstImg,
int dstX0,
int dstY0,
int dstX1,
int dstY1)
Applies the transform to only the specified region inside the destination image.
|
protected abstract void |
applyAll() |
protected abstract void |
applyAll(boofcv.struct.image.GrayU8 mask) |
protected abstract void |
applyOnlyInside() |
protected abstract void |
applyOnlyInside(boofcv.struct.image.GrayU8 mask) |
boofcv.struct.distort.PixelTransform<georegression.struct.point.Point2D_F32> |
getModel()
Returns the distortion model.
|
boolean |
getRenderAll()
Returns the render all flag
|
protected void |
init(Input srcImg,
Output dstImg) |
void |
setModel(boofcv.struct.distort.PixelTransform<georegression.struct.point.Point2D_F32> dstToSrc)
Specifies how pixel coordinates are transformed from the destination
to source images.
|
void |
setRenderAll(boolean renderAll)
Specifies if the entire output image should be rendered, even if mapping to the source image is outside
the source image.
|
protected boofcv.struct.distort.PixelTransform<georegression.struct.point.Point2D_F32> dstToSrc
protected Interpolate extends InterpolatePixel<Input> interp
protected int x0
protected int y0
protected int x1
protected int y1
protected boolean renderAll
public ImageDistortBasic(Interpolate interp)
interp - Interpolation algorithmpublic void setModel(boofcv.struct.distort.PixelTransform<georegression.struct.point.Point2D_F32> dstToSrc)
ImageDistortpublic void apply(Input srcImg, Output dstImg)
ImageDistortpublic void apply(Input srcImg, Output dstImg, boofcv.struct.image.GrayU8 mask)
ImageDistortpublic void apply(Input srcImg, Output dstImg, int dstX0, int dstY0, int dstX1, int dstY1)
ImageDistortapply in interface ImageDistort<Input extends boofcv.struct.image.ImageBase<Input>,Output extends boofcv.struct.image.ImageBase<Output>>srcImg - Input image. Not modified.dstImg - Output image. Modified.dstX0 - Left most crop boundary. Inclusive.dstY0 - Top most crop boundary. Inclusive.dstX1 - Right most crop boundary. Exclusive.dstY1 - Bottom most crop boundary. Exclusive.protected abstract void applyAll()
protected abstract void applyAll(boofcv.struct.image.GrayU8 mask)
protected abstract void applyOnlyInside()
protected abstract void applyOnlyInside(boofcv.struct.image.GrayU8 mask)
public void setRenderAll(boolean renderAll)
ImageDistortsetRenderAll in interface ImageDistort<Input extends boofcv.struct.image.ImageBase<Input>,Output extends boofcv.struct.image.ImageBase<Output>>renderAll - true to render all pixels or false only ones inside the source imagepublic boolean getRenderAll()
ImageDistortgetRenderAll in interface ImageDistort<Input extends boofcv.struct.image.ImageBase<Input>,Output extends boofcv.struct.image.ImageBase<Output>>public boofcv.struct.distort.PixelTransform<georegression.struct.point.Point2D_F32> getModel()
ImageDistort