Class PixelChangeDetector
java.lang.Object
io.github.jspinak.brobot.actions.methods.basicactions.find.motion.PixelChangeDetector
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.bytedeco.opencv.opencv_core.Mat
The absolute difference between pixels is calculated after any grayscale or gaussian operations, but before dilation or threshold operations.org.bytedeco.opencv.opencv_core.Mat
The final Mat will be 1D.org.bytedeco.opencv.opencv_core.Mat
int
int
int
int
List
<org.bytedeco.opencv.opencv_core.Mat> int
int
List
<org.bytedeco.opencv.opencv_core.Mat> getGrays()
List
<org.bytedeco.opencv.opencv_core.Mat> int
int
org.bytedeco.opencv.opencv_core.Mat
boolean
Dilation Operation: For each pixel in the binary image (absDiff), the maximum pixel value in the neighborhood defined by the kernel is computed.boolean
Apply Gaussian blur to the images using a kernel size of 5x5 and standard deviation of 0.boolean
Applying grayscale reduces the Mat to 1-dimension.boolean
Create a binary mask (binary) by thresholding the absolute difference image (absDiff).void
print
(int rows, int cols, int channels)
-
Constructor Details
-
PixelChangeDetector
public PixelChangeDetector()
-
-
Method Details
-
print
public void print(int rows, int cols, int channels) -
getOriginals
-
isUseGrayscale
public boolean isUseGrayscale()Applying grayscale reduces the Mat to 1-dimension. -
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
-
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.
-