Binary Image Mask

Any examples of creating a binary mask of an image? I need to create binary mask of images based on colour of pixels in the image.

You can use: