Machine-Mavericks / Preseason2022

Codebase for the 2022 preseason challenge
Other
0 stars 0 forks source link

Determine if we can reliably detect orientation of cones #14

Open gbuckholtz opened 1 year ago

gbuckholtz commented 1 year ago

The question came up this evening of whether we can use the limelight to see how a cone is oriented (vertical, fallen over to the left, or fallen to the right). I think the answer is yes. Limelights allow you to call OpenCV functions in either Python or Grip: https://docs.limelightvision.io/en/latest/python_software.html OpenCV can return the orientation of an object in an image: https://automaticaddison.com/how-to-determine-the-orientation-of-an-object-using-opencv/ Using these two together it should be possible to tell which way a cone is resting. Things get more complicated if there are touching or overlapping cones, or cones viewed from the end, but it’s a start.

Kabinet0 commented 1 year ago

Wrote an OpenCV Pipeline capable of detecting cubes, cones, as well as guessing if they are standing up or not, also estimates distances accurate to about ~2cm. Unfortunately, I don't know how to upload this to git though..

lilyen06 commented 1 year ago

@Kabinet0 If it’s pipeline code you can add it to the limelight files folder on the camera subsystem branch, see if that works!