Class GroovyCV
java.lang.Object
qupath.opencv.tools.GroovyCV
Category class for enhanced Groovy scripting with OpenCV.
See https://docs.groovy-lang.org/latest/html/api/groovy/lang/Category.html
Warning! This is experimental and likely to change between QuPath releases. Use with caution and discuss on http://forum.image.sc/tag/qupath
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MatCompute the absolute value of all elements in an array.static MatCompute the bitwise AND of two arrays.static <T> Tstatic <T> TasType(ImageProcessor ip, Class<T> cls) Helper method to convert anImageProcessorto aMatusing Groovy's 'as' syntax.static <T> TasType(BufferedImage img, Class<T> cls) Helper method to convert aBufferedImageto aMat,ImageProcessororImagePlususing Groovy's 'as' syntax.static <T> Tstatic <T> THelper method to convert aMatto aBufferedImage,ImagePlus,ImageProcessor, double or float array using Groovy's 'as' syntax.static MatbitwiseNegate(Mat m1) Compute the bitwise NOT of an array.static MatClip values of a Mat to be within a specified minimum and maximum.static MatDivide array elements by a constant.static MatPer-element division of two arrays.static MatCreate a binary image showing where an array has a specific value.static MatCreate a binary image showing where two arrays have matching values.static MatFlatten a Mat to give a single column.static MatApply a greater than or equal to threshold.static MatApply a greater than or equal to threshold between two arrays.static MatApply a greater than threshold.static MatApply a greater than threshold between two arrays.static MatApply a less than or equal to threshold.static MatApply a less than or equal to threshold between two arrays.static MatApply a less than threshold.static MatApply a less than threshold between two arrays.static doubleFind the maximum of all elements in a Mat, ignoring NaNs.static MatGet the per-element maximum value between an array and a scalar.static MatGet the per-element maximum value for two arrays.static doubleCalculate the mean of all elements in a Mat, ignoring NaNs.static doubleFind the minimum of all elements in a Mat, ignoring NaNs.static MatGet the per-element minimum value between an array and a scalar.static MatGet the per-element minimum value for two arrays.static MatSubtract a constant from an array.static MatSubtract one array from another.static MatSubtract a scalar from an array.static MatMultiply array elements by a constant.static MatPer-element multiplication of two arrays (not matrix multiplication).static MatMultiply elements of an array by -1.static MatCompute the bitwise OR of two arrays.static MatAdd an array and a number.static MatAdd two arrays.static MatAdd an array and a scalar.static MatRaise elements of an array to a specified power.static long[]Get the shape of a multidimensional Mat.splitChannels(Mat mat) Split channels of an array.static doubleCalculate the standard deviation of all elements in a Mat, ignoring NaNs.static doubleCalculate the sum of all elements in a Mat, ignoring NaNs.static MatCompute the bitwise XOR of two arrays.
-
Constructor Details
-
GroovyCV
public GroovyCV()
-
-
Method Details
-
mean
Calculate the mean of all elements in a Mat, ignoring NaNs.- Parameters:
mat-- Returns:
-
sum
Calculate the sum of all elements in a Mat, ignoring NaNs.- Parameters:
mat-- Returns:
-
std
Calculate the standard deviation of all elements in a Mat, ignoring NaNs.- Parameters:
mat-- Returns:
-
max
Find the maximum of all elements in a Mat, ignoring NaNs.- Parameters:
mat-- Returns:
-
min
Find the minimum of all elements in a Mat, ignoring NaNs.- Parameters:
mat-- Returns:
-
flatten
-
shape
Get the shape of a multidimensional Mat.- Parameters:
mat-- Returns:
-
clip
-
maximum
-
maximum
-
minimum
-
minimum
-
plus
-
plus
-
plus
-
minus
-
minus
-
minus
-
multiply
-
multiply
-
div
-
div
-
abs
-
negative
-
or
-
and
-
xor
-
bitwiseNegate
-
power
-
splitChannels
-
gt
-
gt
-
eq
-
eq
-
geq
-
geq
-
lt
-
leq
-
leq
-
lt
-
asType
Helper method to convert aMatto aBufferedImage,ImagePlus,ImageProcessor, double or float array using Groovy's 'as' syntax.- Type Parameters:
T-- Parameters:
mat-cls-- Returns:
-
asType
Helper method to convert anImageProcessorto aMatusing Groovy's 'as' syntax.- Type Parameters:
T-- Parameters:
ip-cls-- Returns:
-
asType
- Type Parameters:
T-- Parameters:
imp-cls-- Returns:
-
asType
Helper method to convert aBufferedImageto aMat,ImageProcessororImagePlususing Groovy's 'as' syntax.- Type Parameters:
T-- Parameters:
img-cls-- Returns:
-
asType
-