Skip to content
Connor Monahan edited this page Jan 18, 2015 · 1 revision

This program is to be used in the 2015 First Challenge “Recycle Rush “. This program can determine the difference from a single yellow tote from a stack of yellow totes, determines if the camera is perpendicular to the tote, and returns the angle of rotation needed to line up with the center of the (stack of) yellow totes.

The program uses a ratio of the two ‘L’s by dividing the left ‘L’ by the right ‘L’. If the value is about 1, the object is perpendicular. If the value is greater than one the object is angled left to the camera is to the right of the object’s front face. If the value is less than one, the object is angled right of the camera

The program uses proportions of the field of view to determine the angle of rotation using the equation (image width/FOV.x) = (center.x/unknown degrees) The point center has been remapped from the OpenCV origin of the image, which is the top left point, to the center of the image.

By comparing the center.x value of one tote to every other tote we are able to determine if totes are stacked or not. If they are stacked, we save off the stacked totes into a vector vector of yellowtotes*. Since it is a vector vector we are able to track multiple stacks and keep them separate. If we determine a tote is not stacked, we put it into a vector of not stacked.

YellowTote is a class with the following values:

  • double area ratio
  • double x rotation
  • int stack height
  • point2f center
Clone this wiki locally