java.lang.Object
io.github.jspinak.brobot.actions.methods.basicactions.find.motion.PixelChangeDetector

public class PixelChangeDetector extends Object
  • Constructor Details

    • PixelChangeDetector

      public PixelChangeDetector()
  • Method Details

    • print

      public void print(int rows, int cols, int channels)
    • getOriginals

      public List<org.bytedeco.opencv.opencv_core.Mat> getOriginals()
    • isUseGrayscale

      public boolean isUseGrayscale()
      Applying grayscale reduces the Mat to 1-dimension.
    • getGrays

      public List<org.bytedeco.opencv.opencv_core.Mat> getGrays()
    • isUseGaussianBlur

      public boolean isUseGaussianBlur()
      Apply Gaussian blur to the images using a kernel size of 5x5 and standard deviation of 0. This helps smooth the images and reduce noise.
    • getGaussianWidth

      public int getGaussianWidth()
    • getGaussianHeight

      public int getGaussianHeight()
    • getGaussianSigmaX

      public int getGaussianSigmaX()
    • getGaussians

      public List<org.bytedeco.opencv.opencv_core.Mat> getGaussians()
    • getAbsDiff

      public org.bytedeco.opencv.opencv_core.Mat getAbsDiff()
      The absolute difference between pixels is calculated after any grayscale or gaussian operations, but before dilation or threshold operations. This Mat is 1D.
    • isUseDilation

      public boolean isUseDilation()
      Dilation Operation: For each pixel in the binary image (absDiff), the maximum pixel value in the neighborhood defined by the kernel is computed. If any pixel in the neighborhood has a value of 1 (white), the result at the corresponding position in the output image (dilated) will be set to 1. Effect: Dilation tends to increase the size of bright regions, making them more prominent and connected. It can be useful for filling small gaps, joining nearby contours, or accentuating features in an image.
    • getDilationRows

      public int getDilationRows()
    • getDilationCols

      public int getDilationCols()
    • getDilationType

      public int getDilationType()
    • getDilation

      public org.bytedeco.opencv.opencv_core.Mat getDilation()
    • isUseThreshold

      public boolean isUseThreshold()
      Create a binary mask (binary) by thresholding the absolute difference image (absDiff). Pixels with a difference value greater than or equal to thresh=50 are set to 255 (white), while others are set to 0 (black). This step effectively separates regions with significant differences from those with minor differences.
    • getThreshMin

      public int getThreshMin()
    • getThreshMax

      public int getThreshMax()
    • getThreshold

      public org.bytedeco.opencv.opencv_core.Mat getThreshold()
    • getChangeMask

      public org.bytedeco.opencv.opencv_core.Mat getChangeMask()
      The final Mat will be 1D.