Class ImageProcessingTests
java.lang.Object
test.de.iip_ecosphere.platform.kiServices.functions.images.ImageProcessingTests
Class to test the method of image processing.
- Author:
- Weber
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidUtility method to create new test data from images, will be saved to the testimage folder.static voidMethod to test the imageprocessing tasks in isolation.static BufferedImagetestGrayscaling(BufferedImage image) Testing the grayscaling of images, not much possible automated, just to make sure its not broken.static BufferedImagetestRescalingOfImage(BufferedImage image, int height, int width) Tests the rescaling function of the imageprocessing class.static BufferedImagetestThresholdingImage(BufferedImage image, int threshold) Testing turning an image into black and white, no real assertion possible thus testing if it breaks.
-
Field Details
-
TEST_FILE_PATH
- See Also:
-
TEST_FILE_OUT_PATH
- See Also:
-
-
Constructor Details
-
ImageProcessingTests
public ImageProcessingTests()
-
-
Method Details
-
main
Method to test the imageprocessing tasks in isolation.- Parameters:
args- Args.
-
createB64ImageStringFromImage
Utility method to create new test data from images, will be saved to the testimage folder.- Parameters:
path- Path to the image to use.- Throws:
IOException- If the process fails to find, load or write to a file.
-
testGrayscaling
Testing the grayscaling of images, not much possible automated, just to make sure its not broken.- Parameters:
image- the image to be grayscaled.- Returns:
- the inputimage in grayscale.
-
testThresholdingImage
Testing turning an image into black and white, no real assertion possible thus testing if it breaks.- Parameters:
image- the image to be turned into black and white.threshold- the color value will be used to separate into black and white.- Returns:
- the Image in black and white.
-
testRescalingOfImage
Tests the rescaling function of the imageprocessing class. Only testing for exception as the result cannot be evalutated automaticaly.- Parameters:
image- the image to be resacled.height- the target height of the new image.width- the target width of the new image.- Returns:
- the image with its new dimensions.
-