# How to separate elements from an image

I have this file that will always have a white background and I would like to separate the elements into separate files, but I don't know which function to use.

This is the file:

img = Import["https://i.stack.imgur.com/WydPS.png"]
ColorQuantize[img, 20, Dithering -> False]


I would just like to extract the images as follows:

If this question is very simple or is a duplicate, I would like a guidance

I have Mathematica version 11 available

• Sep 1 '20 at 14:05

Values @ Rest @ ComponentMeasurements[img, "MaskedImage"]

Values @ ComponentMeasurements[ColorQuantize[RemoveBackground[img], 5,