java.awt.image

Class Kernel

  • All Implemented Interfaces:
    Cloneable

    public class Kernel
    extends Object
    implements Cloneable
    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.
    See Also:
    ConvolveOp
    • Constructor Summary

      Constructors 
      Constructor and Description
      Kernel(int width, int height, float[] data)
      Constructs a Kernel object from an array of floats.

        

    • Constructor Detail

      • Kernel

        public Kernel(int width,
              int height,
              float[] data)
        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.
        Parameters:
        width - width of the kernel
        height - height of the kernel
        data - kernel data in row major order
        Throws:
        IllegalArgumentException - if the length of data is less than the product of width and height
    • Method Detail

      • getXOrigin

        public final int getXOrigin()
        Returns the X origin of this Kernel.
        Returns:
        the X origin.
      • getYOrigin

        public final int getYOrigin()
        Returns the Y origin of this Kernel.
        Returns:
        the Y origin.
      • getWidth

        public final int getWidth()
        Returns the width of this Kernel.
        Returns:
        the width of this Kernel.
      • getHeight

        public final int getHeight()
        Returns the height of this Kernel.
        Returns:
        the height of this Kernel.
      • getKernelData

        public final float[] getKernelData(float[] data)
        Returns the kernel data in row major order. The data array is returned. If data is null, a new array is allocated.
        Parameters:
        data - if non-null, contains the returned kernel data
        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
        Throws:
        IllegalArgumentException - if data is less than the size of this Kernel
      • clone

        public Object clone()
        Clones this object.
        Overrides:
        clone in class Object
        Returns:
        a clone of this object.
        See Also:
        Cloneable

Traduction non disponible

Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.

Document créé le 30/08/2006, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-java/awt/image/Kernel.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.

Références

  1. Consulter le document html Langue du document :fr Manuel PHP : https://docs.oracle.com, Kernel

Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.

Table des matières Haut