Class ImageUtils


  • public final class ImageUtils
    extends java.lang.Object
    Author:
    Fabrizio Giudici
    • Constructor Summary

      Constructors 
      Constructor Description
      ImageUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.awt.image.Kernel gaussianBlurKernel​(double sigma)
      Generate a square gaussian blur kernel to be used with the JAI convolve operation.
      static java.awt.image.Kernel gaussianBlurKernel​(double sigma, int size)
      Generate a square gaussian blur kernel to be used with the convolve Op
      static java.awt.color.ICC_Profile getICCProfile​(java.awt.image.RenderedImage image)  
      static java.lang.String getICCProfileName​(java.awt.color.ICC_Profile profile)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ImageUtils

        public ImageUtils()
    • Method Detail

      • getICCProfile

        public static java.awt.color.ICC_Profile getICCProfile​(java.awt.image.RenderedImage image)
      • getICCProfileName

        public static java.lang.String getICCProfileName​(java.awt.color.ICC_Profile profile)
      • gaussianBlurKernel

        public static java.awt.image.Kernel gaussianBlurKernel​(double sigma,
                                                               int size)
        Generate a square gaussian blur kernel to be used with the convolve Op
        Parameters:
        sigma - standard deviation of gaussian bell
        size - size (in pixels) of the square filter; if it's an even number, it is set to the closest greater odd number
        Returns:
        gaussian blur kernel
      • gaussianBlurKernel

        public static java.awt.image.Kernel gaussianBlurKernel​(double sigma)
        Generate a square gaussian blur kernel to be used with the JAI convolve operation. The kernel size is calculated automatically based on the standard deviation parameter, so as to comprise a +/- 3*sigma bell around the center
        Parameters:
        sigma - standard deviation of gaussian bell
        Returns:
        gaussian blur kernel