MATLAB Answers


How do i count number of water glass in a image?

Asked by dika nwnc on 15 May 2018
Latest activity Commented on by Florian Morsch on 18 May 2018
I'm new in image processing, i have to count number of water glass present in a image. How do i count it based on the shape of water glass and ignoring all the different object(not water glass)? So i only count the number of water glass only.
This is my image :

  1 Comment

Do you only have water glasses or could it be that you have a water glass and 3 other objects for example?
If you have only water glasses you just could binarize the image with a threshold set so the glasses are white and the background is black. Then you search for objects with a minimum pixel count (the glasses have a high count, so there shouldnt be so many objects).
If you have other objects within the image you might want to take a look into object detection (e.g. cascade object detector) or neural networks. You also could try template matching or use SURF features.

Sign in to comment.

0 Answers