Catalano.Imaging.Filters
Class RandomConvolution
- java.lang.Object
-
- Catalano.Imaging.Filters.RandomConvolution
-
- All Implemented Interfaces:
- IApplyInPlace
public class RandomConvolution extends java.lang.Object implements IApplyInPlace
Random Convolution filter.- Supported types: Grayscale, RGB.
- Coordinate System: Matrix.
-
-
Constructor Summary
Constructors Constructor and Description RandomConvolution()Initialize a new instance of the RandomConvolution class.RandomConvolution(int size)Initialize a new instance of the RandomConvolution class.RandomConvolution(int size, DoubleRange range)Initialize a new instance of the RandomConvolution class.RandomConvolution(int size, DoubleRange range, boolean replicate)Initialize a new instance of the RandomConvolution class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidapplyInPlace(FastBitmap fastBitmap)Apply filter to an image.voidGenerate()double[][]getKernel()Get generated kernel.booleanisReplicate()Verify if needs replicate pixels when is out of border.voidsetKernel(double[][] kernel)Set custom kernel.voidsetReplicate(boolean replicate)Replicate pixels out of border.
-
-
-
Constructor Detail
-
RandomConvolution
public RandomConvolution()
Initialize a new instance of the RandomConvolution class.
-
RandomConvolution
public RandomConvolution(int size)
Initialize a new instance of the RandomConvolution class.- Parameters:
size- Size of kernel.
-
RandomConvolution
public RandomConvolution(int size, DoubleRange range)Initialize a new instance of the RandomConvolution class.- Parameters:
size- Size of kernel.range- The range of the values.
-
RandomConvolution
public RandomConvolution(int size, DoubleRange range, boolean replicate)Initialize a new instance of the RandomConvolution class.- Parameters:
size- Size of kernel.range- The range of the values.replicate- If need to replicate the elements of the border.
-
-
Method Detail
-
getKernel
public double[][] getKernel()
Get generated kernel.- Returns:
- Generated kernel.
-
setKernel
public void setKernel(double[][] kernel)
Set custom kernel.- Parameters:
kernel- Kernel.
-
isReplicate
public boolean isReplicate()
Verify if needs replicate pixels when is out of border.- Returns:
- Replicate.
-
setReplicate
public void setReplicate(boolean replicate)
Replicate pixels out of border.- Parameters:
replicate- Replicate.
-
Generate
public void Generate()
-
applyInPlace
public void applyInPlace(FastBitmap fastBitmap)
Description copied from interface:IApplyInPlaceApply filter to an image.- Specified by:
applyInPlacein interfaceIApplyInPlace- Parameters:
fastBitmap- Image to be processed.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG