ConvertToBoolMatrix

Declaration: ConvertToBoolMatrix (Data: TDouble2DArray; Threshold: double; var OutMat: TBool2DArray): integer;
The function ConvertToBoolMatrix converts the matrix Data to a boolean matrix by comparing the values in the two-dimensional array Data to the threshold Thresh. If the value of a cell is less than Thresh the corresponding cell in the boolean array OutMat is set to FALSE otherwise the cell value is set to TRUE. The array OutMat is automatically resized to the size of the array Data.

The function returns the number of cells which had values greater than or equal to Thresh.