dimanche 18 juin 2017

Colorful balls detection - computer vision

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 :

  1. Hough Transform (Matlab Toolbox)- The output is a metric for every circle.

  2. 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

  3. 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