x = readImage(system.file('images', 'shapes.png', package='EBImage'))
x = x[110:512,1:130]
y = bwlabel(x)
display(x, title='Original')
print(range(y))
y = normalize(y)
print(range(y))
display(y, title='Segmented')
Run the code above in your browser using DataLab