Colour Tracking With OpenCV - Jack Pender, Blog #4

 Introduction:

As part of this project, the Tello drone is intended to locate anyone in danger in the water and transmit this location for the USV to travel to so it can perform a rescue. Having accessed the camera feed from the Tello and displaying it where it can be monitored, the next step was to have it implement some form of tracking. For test purposes it was decided to detect the colour green.



OpenCV:

The colour tracking was to be implemented in OpenCV and so I simply had to edit the python file that was running the livestream. The first step of this was to import the numpy library as this would be used to calculate the area of the detected green object. This library would also allow me to set the range of colours that the Tello was to detect. It does so by creating an array of RBG values ([22,60,200] and [60,255,255] in my case) that OpenCV can use to detect these specific colours and everything that falls in between. Here I am using these values as the brightest and darkest shades of green, so the Tello will be able to detect these and every shade of green in between. Having detected a green object, the Tello will then draw a green rectangle around it, having calculate the area that the object takes up on the screen.

Next Steps:

Following on from this, the next step is to have the Tello stabilise using the colour green. In a test scenario, if it were to fly over the colour green it should hover in place and transmit its location, which in a real-world scenario the USV could then travel to. Following this implementation, the next step will be to incorporate motion detection, rather than colour detection. This will allow for the Tello to detect a person in danger in the water and use that as the point of stabilisation instead of the colour.

Comments

Popular posts from this blog

How to: Tello drone to micro bit - Victor Alikberov, Blog#1

First USV Test - Jack Pender, Blog #5

OpenCV To RoboRealm - Jack Pender, Blog #7