uvic-aero/onboard-computer

Detect 4"x4"x4" cardboard box using opencv

dragonprevost opened this issue · 0 comments

Note : This Issue is dependant on the completion of OBC framework / structural changes.

During the competition our computer vision driven ground vehicle will need to identify a set of 4 x 4 x 4 in cardboard boxes after entering the depot tent. Once the vehicle can see the cardboard boxes it will travel to the boxes until qr codes become distinguishable.

Input:

  • numpy array video frame ( acquired from pycamera )

Output:

  • Coordinates of all cardboard boxes detected in frame
  • Return -1 or False if no boxes in frame

Notes

  • The boxes can be found here
  • The boxes will have a qr code printed on them
    • Size of qrcode varies from 1 inch by 1 inch to 4inch by 4 inch

Box location classifier

My thought is that there are a few patterns that a simple classification algorithm can pick up. Such as squares within squares, or a concentration of squares of a certain relative size and aspect ratio.

Classifier:

  • Use open CV to extract square shape coordinates from the scene
  • Segment image into a grid (of appropriate scale) that contains identified squares
  • Training documents are comprised of grid element features (list of squares with their sizes, x,y coords, and aspect ratios)
  • Classification: Grid element contains QR Box (Y/N)?