Class MultiKernel
- java.lang.Object
-
- dev.brachtendorf.jimagehash.hashAlgorithms.filter.Kernel
-
- dev.brachtendorf.jimagehash.hashAlgorithms.filter.MultiKernel
-
- All Implemented Interfaces:
Filter,Serializable
public class MultiKernel extends Kernel
Wrapper class to apply multiple kernels in a consecutive manner.Be aware that intermediary calculations are performed on an double precision and only the resulting value will be casted to the lesser precision type if applicable.
- Since:
- 2.0.0
- Author:
- Kilian
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class dev.brachtendorf.jimagehash.hashAlgorithms.filter.Kernel
Kernel.EdgeHandlingStrategy, Kernel.GrayScaleFilter
-
-
Constructor Summary
Constructors Constructor Description MultiKernel(double[][]... kernelMasks)Create a multi kernel with the given kernel maks.MultiKernel(Kernel.EdgeHandlingStrategy[] edgeHandlingStrategies, double[][]... kernelMasks)MultiKernel(Kernel... kernels)Create a multi kernel from the given kernels
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[][]apply(byte[][] input)Apply the kernel to the 2d array.double[][]apply(double[][] input)Apply the kernel to the 2d array.double[][]apply(int[][] input)Apply the kernel to the 2d array.byte[][]applyByte(byte[][] input)Apply the kernel to the 2d array with each value casted to a byte value.int[][]applyInt(int[][] input)Apply the kernel to the 2d array with each value casted to a int value.StringtoString()-
Methods inherited from class dev.brachtendorf.jimagehash.hashAlgorithms.filter.Kernel
applyByte, applyInt, boxFilter, boxFilterNormalized, boxFilterNormalizedSep, calcValue, calcValue, calcValue, edgeDetectionFilter, embossHorizontontalFilter, embossLeftDiagonalFilter, embossleftRightFilter, embossRightDiagonalFilter, equals, filter, gaussianFilter, hashCode, identityFilter, zeroFilter
-
-
-
-
Constructor Detail
-
MultiKernel
public MultiKernel(Kernel... kernels)
Create a multi kernel from the given kernels- Parameters:
kernels- the kernels which will be chained
-
MultiKernel
public MultiKernel(double[][]... kernelMasks)
Create a multi kernel with the given kernel maks. The kernels will use the defaultEdgeHandlingStrategy#EXPAND- Parameters:
kernelMasks- used to construct the kernels
-
MultiKernel
public MultiKernel(Kernel.EdgeHandlingStrategy[] edgeHandlingStrategies, double[][]... kernelMasks)
-
-
Method Detail
-
apply
public double[][] apply(int[][] input)
Description copied from class:KernelApply the kernel to the 2d array. If the desired output is a int[][] array refer toKernel.applyInt(int[][]).
-
applyInt
public int[][] applyInt(int[][] input)
Apply the kernel to the 2d array with each value casted to a int value.
-
apply
public double[][] apply(double[][] input)
Apply the kernel to the 2d array.
-
apply
public double[][] apply(byte[][] input)
Apply the kernel to the 2d array. If the desired output is a byte[][] array refer toapplyByte(byte[][]).
-
applyByte
public byte[][] applyByte(byte[][] input)
Apply the kernel to the 2d array with each value casted to a byte value.
-
-