enter image description hereI am trying to detect precisely colorful balls (a mixture of red,green,yellow) . I attached one of the images in the training set (25 images). I succeded to detect 18/25 balls , and I would like to ask what is your opinion\suggestion. I used :
-
Hough Transform (Matlab Toolbox)- The output is a metric for every circle.
-
Red&Green Canny detector:
R_mask = I(:,:,1) > I(:,:,2) & I(:,:,1) > 2*I(:,:,3); G_mask = I(:,:,2) > I(:,:,1) & I(:,:,2) > 2*I(:,:,3); R_mask = edge(R_mask,'canny'); G_mask = edge(G_mask,'canny'); se = strel('disk',6); R_mask = imdilate(R_mask,se); G_mask = imdilate(G_mask,se); Mask = R_mask.*G_mask; end
-
I chose the circle with the highest metric, and contains most of the element in the Mask (ismember function). the result is not so good, please see attached fileenter image description here
Aucun commentaire:
Enregistrer un commentaire