Package inra.ijpb.math
Interface ImageCalculator.Operation
- Enclosing class:
- ImageCalculator
public static interface ImageCalculator.Operation
General interface for defining an operation that combines the values of
two pixels to create a new one. Contains also static instances
corresponding to classical operations.
- Author:
- David Legland
-
Field Summary
Fields Modifier and Type Field Description static ImageCalculator.Operation
ABS_DIFF
Abs_diff operator, that computes the absolute value of the difference of values of the two imagesstatic ImageCalculator.Operation
AND
And operator.static ImageCalculator.Operation
DIVIDES
Divides operator, that divides the values of the two imagesstatic ImageCalculator.Operation
MAX
Max operator, that computes the maximum of the values from the two imagesstatic ImageCalculator.Operation
MEAN
Mean operator, that computes the average of the values from the two imagesstatic ImageCalculator.Operation
MIN
Min operator, that computes the minimum of the values from the two imagesstatic ImageCalculator.Operation
MINUS
Minus operator, that subtracts values of the two imagesstatic ImageCalculator.Operation
OR
Or operator.static ImageCalculator.Operation
PLUS
Plus operator, that adds values of the two imagesstatic ImageCalculator.Operation
TIMES
Times operator, that multiples values of the two imagesstatic ImageCalculator.Operation
XOR
Exclusive or operator. -
Method Summary
-
Field Details
-
PLUS
Plus operator, that adds values of the two images -
MINUS
Minus operator, that subtracts values of the two images -
ABS_DIFF
Abs_diff operator, that computes the absolute value of the difference of values of the two images -
TIMES
Times operator, that multiples values of the two images -
DIVIDES
Divides operator, that divides the values of the two images -
MAX
Max operator, that computes the maximum of the values from the two images -
MIN
Min operator, that computes the minimum of the values from the two images -
MEAN
Mean operator, that computes the average of the values from the two images -
AND
And operator. -
OR
Or operator. -
XOR
Exclusive or operator.
-
-
Method Details
-
applyTo
int applyTo(int v1, int v2)The method to override to make it possible to use an operation.- Parameters:
v1
- value of pixel in first imagev2
- value of pixel in second image- Returns:
- the result of the combination of the two pixel values
-
applyTo
float applyTo(float v1, float v2)The method to override to make it possible to use an operation.- Parameters:
v1
- value of pixel in first imagev2
- value of pixel in second image- Returns:
- the result of the combination of the two pixel values
-