In the first step, we create a pixel classifier. We only care about good quality segmentation of the powder content at this step. In our example, we define the classes "background", "paper label", "vial", and "powder". Our classifier decisions look like this:
