Class ImageUtils

java.lang.Object
io.github.jspinak.brobot.imageUtils.ImageUtils

@Component public class ImageUtils extends Object
  • Constructor Details

    • ImageUtils

      public ImageUtils(GetImage getImage)
  • Method Details

    • saveRegionToFile

      public String saveRegionToFile(Region region, String path)
      Saves the region to file as a .png file.
      Parameters:
      region - The region to save
      path - The base path name: the first free filename will be used based on the base path name and an available number.
      Returns:
      The path name used to save the file.
    • getFreePath

      public String getFreePath(String path)
      Searches for the first free filename with the given base path name.
      Parameters:
      path - the base path name
      Returns:
      the path name with the first free filename
    • getFreePath

      public String getFreePath(String prefix, String suffix)
    • getFreePath

      public String getFreePath()
    • getFreeNumber

      public int getFreeNumber()
    • getFreeNumber

      public int getFreeNumber(String path)
    • writeWithUniqueFilename

      public boolean writeWithUniqueFilename(org.bytedeco.opencv.opencv_core.Mat mat, String nameWithoutFiletype)
    • writeAllWithUniqueFilename

      public boolean writeAllWithUniqueFilename(List<org.bytedeco.opencv.opencv_core.Mat> mats, List<String> filenames)