public static void emptyMatrix ( byte [ ] [ ] matrix , int maxX , int maxY ) { for ( int i = 0 ; i < maxX ; i ++ ) { for ( int j = 0 ; j < maxY ; j ++ ) { matrix [ i ] [ j ] = 0 ; } } }
It is not very efficient but it is simple enough