0

For past 4 days I am trying to detect a transparent glass plates of various shapes and dimensions from live video feed... Since I cannot use colour tracking to detect transparency, searching over net I got to know about large contour detection, match shapes, match template... but my attempts failed to get my result... My friend is telling to use Haar cascade to do it.., What i need to know is,

  1. there any better way to detect transparent objects instead of doing contour...

  2. Am i missing out something very basic...

  3. Will haar cascade be the better candidate to get result...

P.S: I am using MS Visual studio and c++ to do my coding... And I am only 5 days old in using the opencv lib... Your help will mean alot to me..

Ninja
  • 21
  • 1
  • 2
  • If it is your first experience using opencv, I would suggest to start with something simple like detecting birds or choosing between dogs and cats. Even better choose a research paper from cvpapers.com and implement it. – ivan_a May 30 '15 at 14:07

2 Answers2

1

You can try use method mentioned in this answer (or just read this article). It was designed for detecting glass, but i think it will work with most of transparent objects or at least will give you a good point to start.

Community
  • 1
  • 1
cyriel
  • 3,522
  • 17
  • 34
0

Haar Cascade Training is a Machine Learning method to train some data and send a later query of what you want to say "yes" or "no". (It is useful for more things, but this is what you're looking for).

Well, when I've been taught Machine Learning, my teachers said something like:

Machine Learning is used as method when you can't implement it programmatically, or the code is inefficient or very long which escapes from the number of variables that you can "obtain" from your conditions.

Analysing your problem, I'd say it's very difficult if you don't control light conditions, surfaces where the plates or glasses could be and etcetera, so that becomes a Machine Learning problem I guess.

Yes, my answer would be:

  1. Try to train a glass to start to solve your problem
  2. Take 3 - 5 glasses with different shapes, but not very different between them. For example: enter image description here
  3. Take pictures with your webcam from that angle, just rotating a little bit your camera to "capture" the deformities between glasses.
  4. Add different conditions (light, sun light, different surfaces, different backgrounds, etcetera).
  5. When you have enough pictures (2000 for example?) train them following any tutorial on Internet, for example this one: http://note.sonots.com/SciSoftware/haartraining.html

Well, if that works, do it with plates as well!

Good luck.

Rafael Ruiz Muñoz
  • 5,333
  • 6
  • 46
  • 92