Label matrix of contiguous regions, returned as a 2-D array of nonnegative integers of class double. The kth region includes all elements in L that have value k. The number of objects and holes represented by L is equal to max(L(:)). The zero-valued elements of L make up the background.