roboflow / dji-aerial-georeferencing Goto Github PK
View Code? Open in Web Editor NEWDetect objects in drone videos and plot them on a map
Home Page: https://blog.roboflow.com/georeferencing-drone-videos/
License: Apache License 2.0
Detect objects in drone videos and plot them on a map
Home Page: https://blog.roboflow.com/georeferencing-drone-videos/
License: Apache License 2.0
I've read the blog post on roboflow and tried to follow along on the Try it in your Browser and Run it Locally guide in the ReadMe, but am having difficulties getting them to work. More specifically, the deployed GitHub page does not exist, and running the npm run build:dev
returns TAILWIND_MODE errors.
I've also included screenshots of my outputs in the Roboflow forums post.
center = Point([self.observation["longitude"], self.observation["latitude"]]) # Convert longitude and latitude to GeoJSON Point
altitude = float(self.observation["ascent(feet)"]) * 0.3048 # Convert ascent to meters
fov_atan = math.tan(self.fov)
diagonal_distance = altitude * fov_atan
distance = diagonal_distance / 2
bearing = (float(self.observation["compass_heading(degrees)"]) - 90) % 360 # Calculate bearing
offset = math.atan(self.video_height / self.video_width) * 180 / math.pi # Calculate offset based on video resolution
# Calculate GPS coordinates of the video's four corners
options = {'units': 'm'}
self.top_left = rhumb_destination(center, distance, (bearing - offset + 180) % 360 - 180, options).geometry.coordinates
self.top_left = self.top_left[:: -1]
self.top_right = rhumb_destination(center, distance, (bearing + offset + 180) % 360 - 180,options).geometry.coordinates
self.top_right = self.top_right[:: -1]
self.bottom_right = rhumb_destination(center, distance, (bearing - offset) % 360 - 180, options).geometry.coordinates
self.bottom_right = self.bottom_right[:: -1]
self.bottom_left = rhumb_destination(center, distance, (bearing + offset) % 360 - 180, options).geometry.coordinates
self.bottom_left = self.bottom_left[:: -1]
# print the GPS coordinates of the video's four corners
self.current_position = [self.observation["latitude"], self.observation["longitude"]]
normalized = [self.dy - self.video_height / 2, self.dx- self.video_width / 2]
distanceFromCenterInPixels = math.sqrt((self.video_width / 2 - self.dx) ** 2 + (self.video_height / 2 - self.dy) ** 2)
diagonalDistanceInPixels = math.sqrt(self.video_width ** 2 + self.video_height ** 2)
percentOfDiagonal = distanceFromCenterInPixels / diagonalDistanceInPixels
distance = percentOfDiagonal * diagonal_distance # in meters
angle = math.atan(normalized[0] / (normalized[1] or 0.000001)) * 180 / math.pi
# if the detection is in the right half of the frame, we need to rotate it 180 degrees
if normalized[1] >= 0:
angle += 180
point = rhumb_destination(center, distance, (bearing + angle) % 360, options).geometry.coordinates
point = point[:: -1]
Certainly! Isuccessfully rewritten the code in Python, and it's functioning well when the gimbal pitch is set to -90. If I want to extend the functionality to handle cases where the pitch value is different from -90, what should I do ?
Thanks for ope-sourcing your work.
I have a question regarding camera movement for your current implementation you are assuming that camera is looking down thus drone's position will always be in the center of image but how can we adjust the position error when our drone is looking at an angle.
If possible can you also recommend any book or resource.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.