So I am working on a project where we are supposed to detect and count the red and gold ornaments in the picture provided in the link below. I am having issues detecting and counting each ornament and cant seem to figure out why. I will outline my process:
1) input image and convert to grayscale then binary 2) using a disk structuring element perform a closing operation to remove the areas around the ornaments. 3) use a method to detect the circles (No problems here I think the main issue is in 2).
Is there a better way for me to isolate the red and gold ornaments? I just need a pointer in the right direction as I have tried a variety of things and none of them seem to work so I am starting to panic. I am working on this project in MATLAB and have included the current output below.
http://www.deviantart.com/art/Xmas-tree-png-3-HQ-large-398885414