java.lang.Object
de.iip_ecosphere.platform.kiServices.functions.images.ImageProcessing

public class ImageProcessing extends Object
Utility class for the processing of images.
Author:
Alexander Weber, SSE
  • Constructor Details

    • ImageProcessing

      public ImageProcessing()
  • Method Details

    • grayScaleImage

      public static BufferedImage grayScaleImage(BufferedImage bufferedImage)
      Gray scales a BufferedImage.
      Parameters:
      bufferedImage - The image to be converted.
      Returns:
      The original image as gray scale.
    • thresholdImage

      public static BufferedImage thresholdImage(BufferedImage image, int threshold)
      Converts an image to a binary one based on given threshold. A lower threshold will result in more of the image being completely white.
      Parameters:
      image - the bufferedimage to convert.
      threshold - the threshold in [0,255]
      Returns:
      a new BufferedImage instance of TYPE_BYTE_GRAY with only 0'S and 255's
    • rescaleImage

      public static BufferedImage rescaleImage(BufferedImage image, int targetHeight, int targetWidth)
      To shrink the pixelcount in an image without changing its content.
      Parameters:
      image - The image to rescale.
      targetHeight - The pixel hight it should have.
      targetWidth - The pixel width it should have.
      Returns:
      A smaller version of the original image.