Package algorithm
Class MatHelper
java.lang.Object
algorithm.MatHelper
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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- 
MatHelperpublic MatHelper()
 
- 
- 
Method Details- 
matToArraypublic 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
 
- 
isEmptypublic 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
 
- 
calculateRoipublic 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 image
- noExecute- 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
 
 
-