-2

Can anyone describe me about this code. This code is small part for count the number of finger after done some preprocessing and get contour, hull and defects:

if ((startCircle.Center.Y < box.center.Y || depthCircle.Center.Y < box.center.Y) && (startCircle.Center.Y < depthCircle.Center.Y) && (Math.Sqrt(Math.Pow(startCircle.Center.X – depthCircle.Center.X, 2) + Math.Pow(startCircle.Center.Y – depthCircle.Center.Y, 2)) > box.size.Height / 6.5))

I find that code here: http://www.andol.info/hci/1984.htm But how can be like that? especially at the end of code its devide 6.5, what is mean?

Thank you.

okibhayo
  • 31
  • 5
  • The code you posted is a small snippet of *all* the code it takes to do this. That being said, the article you linked *is* an explanation of how it works and assumes the reader can read and comprehend code examples. You need to restructure this question to ask a specific question or it will likely be downvoted and closed. – Evan L Feb 09 '14 at 16:46
  • @EvanL thank you for your corrective and explain more :) I already restructure my question. Hope that one will work. – okibhayo Feb 10 '14 at 01:59

1 Answers1

1

This code isn't counting the number of finger, rather it tries to detect finger tips. This is a heuristic and it is part of a whole process. (Background Substraction, moving object detection, biggest object detection, convex hull detection, ...)

To read more about this method, read following paper, you will find as well some explanatory images.

http://cirworld.com/index.php/ijct/article/viewFile/2758/pdf_277

user1767754
  • 23,311
  • 18
  • 141
  • 164
  • thank you, your recomendation paper led me her :) http://www.jaist.ac.jp/~s1010205/resources/Computer-Vision/report – okibhayo Feb 10 '14 at 02:23