Converted the internal representation of the labels from unsigned char to int, in order to support larger no of connected components.