how do I detect on which side the object is if I draw a line the middle

0

My friends, I'm discovering computer vision. I'm programmed in python and wanted to know how I do to identify in which position the object is in relation to a line drawn in the middle of the screen. Being more direct, if a line is in the middle of the screen how do I know if the detected object is on the left or the right?

    
asked by anonymous 23.07.2018 / 18:29

1 answer

1

2D general case:

First let's consider some parameters.

  • The line is vertical and defined by points A and B
  • The object is entirely on one side or the other side of the line
  • You have the information of some point P belonging to the object

To define the side where the object is, we map the vector product between the vectors defined by and:

23.07.2018 / 21:43