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.OperationABS_DIFFAbs_diff operator, that computes the absolute value of the difference of values of the two imagesstatic ImageCalculator.OperationANDAnd operator.static ImageCalculator.OperationDIVIDESDivides operator, that divides the values of the two imagesstatic ImageCalculator.OperationMAXMax operator, that computes the maximum of the values from the two imagesstatic ImageCalculator.OperationMEANMean operator, that computes the average of the values from the two imagesstatic ImageCalculator.OperationMINMin operator, that computes the minimum of the values from the two imagesstatic ImageCalculator.OperationMINUSMinus operator, that subtracts values of the two imagesstatic ImageCalculator.OperationOROr operator.static ImageCalculator.OperationPLUSPlus operator, that adds values of the two imagesstatic ImageCalculator.OperationTIMESTimes operator, that multiples values of the two imagesstatic ImageCalculator.OperationXORExclusive 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
-