New answers tagged


If the distinct contents/ingredients really have different colors than you just have to take a picture, always in the same location/distance, and then count the amount of pixels for each color. You can transform your RGB image to the HSV color space to make it easy to identify specific colors. Some pseudocode: image_hsv = rgb2hsv(image_rgb) greenmax = ...

Top 50 recent answers are included