Class FastImageOps
java.lang.Object
org.episteme.core.media.vision.ops.FastImageOps
High-performance Image Operations.
Uses Parallel Streams to accelerate pixel-wise operations, mimicking GPU SIMD behavior where actual GPU context is unavailable or overhead is too high.
- Since:
- 2.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int[]resizeNearest(int[] pixels, int w1, int h1, int w2, int h2) Resizes an image using Nearest Neighbor interpolation in parallel.static byte[]rgbToGrayscale(int[] rgbPixels, int width, int height) Converts an RGB image array to Grayscale in parallel.
-
Constructor Details
-
FastImageOps
public FastImageOps()
-
-
Method Details
-
rgbToGrayscale
public static byte[] rgbToGrayscale(int[] rgbPixels, int width, int height) Converts an RGB image array to Grayscale in parallel.- Parameters:
rgbPixels- input pixels (int array ARGB).width- image width.height- image height.- Returns:
- grayscale byte array.
-
resizeNearest
public static int[] resizeNearest(int[] pixels, int w1, int h1, int w2, int h2) Resizes an image using Nearest Neighbor interpolation in parallel.- Parameters:
pixels- source pixels.w1- source width.h1- source height.w2- target width.h2- target height.- Returns:
- resized pixels.
-