1 | initial version |
Since many bottles are quite similar and/or transparent, I think that using keypoints is not a good idea. You will get many edge keypoints that would look exactly the same on each bottle. However, keypoints would be perfect if you were to identify bottles by labels on them, but since you did not mention it, I think this is not the case. Therefore, my suggestion is to subtract the image with a bottle from the empty background. That (provided you have proper lighting generating no shadows) would give you a nice silhouette of each inserted item. Find the contour of the item and compare it with the contours stored in your database. Use the width and height information, matchShapes function and perhaps number of vertices of the contour approximation.