OpenCV, C++: Distance between two points

前端 未结 4 1736
旧时难觅i
旧时难觅i 2020-12-23 23:02

For a group project, we are attempting to make a game, where functions are executed whenever a player forms a set of specific hand gestures in front of a camera. To process

4条回答
  •  無奈伤痛
    2020-12-23 23:35

    This ought to a comment, but I haven't enough rep (50?) |-( so I post it as an answer.

    What the guys are trying to tell you in the comments of your questions is that if it's only about comparing distances, then you can simply use d=(dx*dx+dy*dy) = (x1-x2)(x1-x2) + (y1-y2)(y1-y2) thus avoiding the square root. But you can't of course skip the square elevation.

提交回复
热议问题