Class ImageUtils
java.lang.Object
io.github.jspinak.brobot.imageUtils.ImageUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
int
getFreeNumber
(String path) getFreePath
(String path) Searches for the first free filename with the given base path name.getFreePath
(String prefix, String suffix) saveRegionToFile
(Region region, String path) Saves the region to file as a .png file.boolean
writeAllWithUniqueFilename
(List<org.bytedeco.opencv.opencv_core.Mat> mats, List<String> filenames) boolean
writeWithUniqueFilename
(org.bytedeco.opencv.opencv_core.Mat mat, String nameWithoutFiletype)
-
Constructor Details
-
ImageUtils
-
-
Method Details
-
saveRegionToFile
Saves the region to file as a .png file.- Parameters:
region
- The region to savepath
- 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
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
-
getFreePath
-
getFreeNumber
public int getFreeNumber() -
getFreeNumber
-
writeWithUniqueFilename
public boolean writeWithUniqueFilename(org.bytedeco.opencv.opencv_core.Mat mat, String nameWithoutFiletype) -
writeAllWithUniqueFilename
-