Class OpenCVPaddingFunction
- java.lang.Object
-
- science.aist.imaging.opencv.imageprocessing.transformation.OpenCVPaddingFunction
-
- All Implemented Interfaces:
Function<ImageWrapper<org.opencv.core.Mat>,ImageWrapper<org.opencv.core.Mat>>
,ImageFunction<org.opencv.core.Mat,org.opencv.core.Mat>
public class OpenCVPaddingFunction extends Object implements ImageFunction<org.opencv.core.Mat,org.opencv.core.Mat>
Function for apply a padding around the image. Creates a Border around the image with the given color.
- Since:
- 1.0
- Author:
- Christoph Praschl
-
-
Constructor Summary
Constructors Constructor Description OpenCVPaddingFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImageWrapper<org.opencv.core.Mat>
apply(ImageWrapper<org.opencv.core.Mat> image)
void
setBorderMode(OpenCVBorderMode borderMode)
void
setPaddings(int padding)
Parameter specifying how many pixels in each direction from the source image rectangle to extrapolate.void
setPaddings(int top, int right, int bottom, int left)
Parameter specifying how many pixels in each direction from the source image rectangle to extrapolate.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface science.aist.imaging.api.ImageFunction
andThen, andThenCloseInput, andThenConsumeInput
-
-
-
-
Method Detail
-
setPaddings
public void setPaddings(int top, int right, int bottom, int left)
Parameter specifying how many pixels in each direction from the source image rectangle to extrapolate.- Parameters:
top
- padding topbottom
- padding bottomleft
- padding leftright
- padding right
-
setPaddings
public void setPaddings(int padding)
Parameter specifying how many pixels in each direction from the source image rectangle to extrapolate.- Parameters:
padding
- padding top
-
setBorderMode
public void setBorderMode(OpenCVBorderMode borderMode)
- Parameters:
borderMode
- Border type, one of the BORDER_* , except for BORDER_TRANSPARENT and BORDER_ISOLATED .
-
apply
public ImageWrapper<org.opencv.core.Mat> apply(ImageWrapper<org.opencv.core.Mat> image)
- Specified by:
apply
in interfaceFunction<ImageWrapper<org.opencv.core.Mat>,ImageWrapper<org.opencv.core.Mat>>
-
-