Class ImageProcessor

java.lang.Object
org.aoju.bus.image.nimble.opencv.ImageProcessor

public class ImageProcessor extends Object
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Details

    • ImageProcessor

      public ImageProcessor()
  • Method Details

    • applyLUT

      public static ImageCV applyLUT(org.opencv.core.Mat source, byte[][] lut)
    • rescaleToByte

      public static ImageCV rescaleToByte(org.opencv.core.Mat source, double alpha, double beta)
    • invertLUT

      public static ImageCV invertLUT(ImageCV source)
    • bitwiseAnd

      public static ImageCV bitwiseAnd(org.opencv.core.Mat source, int src2Cst)
    • crop

      public static ImageCV crop(org.opencv.core.Mat source, Rectangle area)
    • minMaxLoc

      public static org.opencv.core.Core.MinMaxLocResult minMaxLoc(RenderedImage source, Rectangle area)
    • transformShapeToContour

      public static List<org.opencv.core.MatOfPoint> transformShapeToContour(Shape shape, boolean keepImageCoordinates)
    • meanStdDev

      public static double[][] meanStdDev(org.opencv.core.Mat source)
    • meanStdDev

      public static double[][] meanStdDev(org.opencv.core.Mat source, Shape shape)
    • meanStdDev

      public static double[][] meanStdDev(org.opencv.core.Mat source, Shape shape, Integer paddingValue, Integer paddingLimit)
    • getMaskImage

      public static List<org.opencv.core.Mat> getMaskImage(org.opencv.core.Mat source, Shape shape, Integer paddingValue, Integer paddingLimit)
    • minMaxLoc

      public static org.opencv.core.Core.MinMaxLocResult minMaxLoc(org.opencv.core.Mat srcImg, org.opencv.core.Mat mask)
    • findContours

      public static List<org.opencv.core.MatOfPoint> findContours(RenderedImage source, Rectangle area)
    • scale

      public static ImageCV scale(org.opencv.core.Mat source, Dimension dim)
    • scale

      public static ImageCV scale(org.opencv.core.Mat source, Dimension dim, Integer interpolation)
    • combineTwoImages

      public static ImageCV combineTwoImages(org.opencv.core.Mat source, org.opencv.core.Mat imgOverlay, int transparency)
    • overlay

      public static ImageCV overlay(org.opencv.core.Mat source, RenderedImage imgOverlay, Color color)
    • drawShape

      public static BufferedImage drawShape(RenderedImage source, Shape shape, Color color)
    • applyCropMask

      public static ImageCV applyCropMask(org.opencv.core.Mat source, Rectangle b, double alpha)
    • applyShutter

      public static ImageCV applyShutter(org.opencv.core.Mat source, Shape shape, Color color)
    • applyShutter

      public static ImageCV applyShutter(org.opencv.core.Mat source, RenderedImage imgOverlay, Color color)
    • getAsImage

      public static BufferedImage getAsImage(Area shape, RenderedImage source)
    • getRotatedImage

      public static ImageCV getRotatedImage(org.opencv.core.Mat source, int rotateCvType)
    • flip

      public static ImageCV flip(org.opencv.core.Mat source, int flipCvType)
    • getRotatedImage

      public static ImageCV getRotatedImage(org.opencv.core.Mat source, double angle, double centerx, double centery)
    • warpAffine

      public static ImageCV warpAffine(org.opencv.core.Mat source, org.opencv.core.Mat matrix, org.opencv.core.Size boxSize, Integer interpolation)
    • findMinMaxValues

      public static org.opencv.core.Core.MinMaxLocResult findMinMaxValues(org.opencv.core.Mat source)
      Computes Min/Max values from Image excluding range of values provided
      Parameters:
      source - the mat
      Returns:
      the object
    • findMinMaxValues

      public static org.opencv.core.Core.MinMaxLocResult findMinMaxValues(org.opencv.core.Mat source, Integer paddingValue, Integer paddingLimit)
    • buildThumbnail

      public static ImageCV buildThumbnail(PlanarImage source, Dimension iconDim, boolean keepRatio)
    • writeImage

      public static boolean writeImage(org.opencv.core.Mat source, File file)
    • writeThumbnail

      public static boolean writeThumbnail(org.opencv.core.Mat source, File file, int maxSize)
    • writePNG

      public static boolean writePNG(org.opencv.core.Mat source, File file)
    • writeImage

      public static boolean writeImage(RenderedImage source, File file)
    • writeImage

      public static boolean writeImage(org.opencv.core.Mat source, File file, org.opencv.core.MatOfInt params)
    • readImage

      public static ImageCV readImage(File file, List<String> tags)
    • readImageWithCvException

      public static ImageCV readImageWithCvException(File file, List<String> tags)
    • blur

      public org.opencv.core.Mat blur(org.opencv.core.Mat input, int numberOfTimes)
    • process

      public void process(org.opencv.core.Mat sourceImage, org.opencv.core.Mat resultImage, int tileSize)