I would like to extract the number of objects by color from an image stored as a jpeg file. I never was asked to do such mission so I would like to have some jump start / suitable packages for this mission or any other R solution/hint for this kind of problems.