install python 3.9+
pip install -r requirements.txt
python main.py
https://www.youtube.com/watch?v=oDu4I2cUXrg
Proposed solution tackles the problem with navigation based only on visual data.
The main problem with visual navigation is to find current position. This solution finds current object position by “searching” image taken right below the object in the base map (for example satellite map provided). The search is conducted by simple statistical image comparison.
Details:
The mechanism used for comparison is matchTemplate()
function from OpenCV. This function uses 6 similarity calculation methods from which we use 3 to select single most matched piece of the image.
Methods used:
TM_SQDIFF = Template Matching Square Difference
TM_CCOEFF = Template Matching Correlation Coefficient
TM_CCORR = Template Matching Cross Correlation
When current position is found its marked on the map.
Marking the object's position after rotation is possible by rotating the sector map by the appropriate angle and matching the drone's image. Methods used:
When the current position is determined the navigated object rotates to certain angle and goes forward. The necessary angle of rotation of the drone is calculated based on the slope coefficients of the straights (the drone's heading straight and the straight to the target point). Calculating the angle:
- Need for a top down camera
- Current satellite image
- Lightweight - calculation position in real time
- Independence from sensors (vision only)
- Robustness against drone rotation
- Robustness to drone altitude change
- Not available for drones without a top down camera
- Recognition of current position by comparison of characteristic points (object detection)
- Determination of current position by comparison of sequential frame
Image comparison with satelite map from real topdown dron camera