The Kernel class defines a matrix that describes how a specified pixel and its surrounding pixels affect the value computed for the pixel's position in the output image of a filtering operation. The X origin and Y origin indicate the kernel matrix element that corresponds to the pixel position for which an output value is being computed.
The Kernel class defines a matrix that describes how a specified pixel and its surrounding pixels affect the value computed for the pixel's position in the output image of a filtering operation. The X origin and Y origin indicate the kernel matrix element that corresponds to the pixel position for which an output value is being computed.
(->kernel width height data)
Constructor.
Constructs a Kernel object from an array of floats. The first widthheight elements of the data array are copied. If the length of the data array is less than widthheight, an IllegalArgumentException is thrown. The X origin is (width-1)/2 and the Y origin is (height-1)/2.
width - width of the kernel - int
height - height of the kernel - int
data - kernel data in row major order - float[]
throws: java.lang.IllegalArgumentException - if the length of data is less than the product of width and height
Constructor. Constructs a Kernel object from an array of floats. The first width*height elements of the data array are copied. If the length of the data array is less than width*height, an IllegalArgumentException is thrown. The X origin is (width-1)/2 and the Y origin is (height-1)/2. width - width of the kernel - `int` height - height of the kernel - `int` data - kernel data in row major order - `float[]` throws: java.lang.IllegalArgumentException - if the length of data is less than the product of width and height
(clone this)
Clones this object.
returns: a clone of this object. - java.lang.Object
Clones this object. returns: a clone of this object. - `java.lang.Object`
(get-height this)
Returns the height of this Kernel.
returns: the height of this Kernel. - int
Returns the height of this Kernel. returns: the height of this Kernel. - `int`
(get-kernel-data this data)
Returns the kernel data in row major order. The data array is returned. If data is null, a new array is allocated.
data - if non-null, contains the returned kernel data - float[]
returns: the data array containing the kernel data
in row major order or, if data is
null, a newly allocated array containing
the kernel data in row major order - float[]
throws: java.lang.IllegalArgumentException - if data is less than the size of this Kernel
Returns the kernel data in row major order. The data array is returned. If data is null, a new array is allocated. data - if non-null, contains the returned kernel data - `float[]` returns: the data array containing the kernel data in row major order or, if data is null, a newly allocated array containing the kernel data in row major order - `float[]` throws: java.lang.IllegalArgumentException - if data is less than the size of this Kernel
(get-width this)
Returns the width of this Kernel.
returns: the width of this Kernel. - int
Returns the width of this Kernel. returns: the width of this Kernel. - `int`
(get-x-origin this)
Returns the X origin of this Kernel.
returns: the X origin. - int
Returns the X origin of this Kernel. returns: the X origin. - `int`
(get-y-origin this)
Returns the Y origin of this Kernel.
returns: the Y origin. - int
Returns the Y origin of this Kernel. returns: the Y origin. - `int`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close