A new clustering algorithm based on the connected region generation