Skip to content

Instantly share code, notes, and snippets.

@diegoaguilar
Created April 2, 2015 21:31
Show Gist options
  • Save diegoaguilar/725b50064e97e317f973 to your computer and use it in GitHub Desktop.
Save diegoaguilar/725b50064e97e317f973 to your computer and use it in GitHub Desktop.
OpenCV detection alternatives
diegoaguilar: a unique background color will make things easier. since you want to recognize can vs bottle rather than pepsi vs coke, shape matching is probably the way to go. Use the unique background color to create a mask of bg and not bg. Then either 1) compare the mask to a list of template images with matchTemplate, 2) use the outermost contour for matchShapes, or 3) or use linemod which is difficult to work with but rocks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment