Package algorithm
Class MatHelper
java.lang.Object
algorithm.MatHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int[]calculateRoi(org.opencv.core.Mat mat, boolean noExecute) Calculates the region of interest.static booleanisEmpty(org.opencv.core.Mat mat) Returns whether the provided Row/Column is empty.static double[][]matToArray(org.opencv.core.Mat mat) Converts an OpenCV-Mat to a double array
-
Constructor Details
-
MatHelper
public MatHelper()
-
-
Method Details
-
matToArray
public static double[][] matToArray(org.opencv.core.Mat mat) Converts an OpenCV-Mat to a double array- Parameters:
mat- Matrix to convert- Returns:
- The matrix as array
-
isEmpty
public static boolean isEmpty(org.opencv.core.Mat mat) Returns whether the provided Row/Column is empty.- Parameters:
mat- The row-/column-vector- Returns:
- true if the vector contains only zeros, false if not
-
calculateRoi
public static int[] calculateRoi(org.opencv.core.Mat mat, boolean noExecute) Calculates the region of interest. This is the region of the image that is not empty.- Parameters:
mat- Input imagenoExecute- Whether the true region shall be calculated. If set to false, the image won't be changed (for testing purpose)- Returns:
- Indices of the submat with content
-