Video for 3D mapping
Hivemapper will take any video and attempt to generate a 3D map from it. The quality and size of these maps can be significantly influenced by your camera sensor, and it’s settings, collection method, and the various environments you are trying to map.
Hivemapper currently works best with airborne video with plans to support ground collection soon. The fastest and easiest way to get started with a collection is by using an off the shelf consumer drone. This guide will help you get started building maps in Hivemapper using aerial video.
Supported video specs
Hivemapper accepts a wide range of video specifications for building maps:
|Format||Hivemapper accepts most modern video formats. If you experience any issues uploading a specific format please contact us.|
|Frame-rate||Any frame-rate is acceptable.|
|Max length||30 minutes|
Adjust your camera settings for mapping with the following concepts in mind:
Exposure - Most mapping locations will have considerable fluctuation in lighting; having both overexposed sunny areas to very dark shadowy areas. For that reason we recommend using automatic exposure to ensure all frames are correctly exposed.
Shutter speed - You want your video frame to be as crisp and clear as possible so we recommend using a shutter speed between 1/100 to 1/320 of a second. Under 1/100 may result in motion blur which can negatively affect reconstruction. A much higher shutter speed is acceptable however you should be aware of any problems high shutter speeds might create with your specific equipment such as distortion caused by vibrations and rolling shutter.
Focus/Depth of Field - A shallow depth of field plays no helpful role in 3D mapping. The ground and all the features you want to map should be sharp and in focus. We recommend taking advantage of this fact and closing the aperture as much as possible vs adding ND filters to compensate for bright lighting conditions whenever possible.
Zoom - Hivemapper works by comparing features between frames taken at the same zoom level. If you are working with a zoom lense we recommend you adjust your zoom level as rarely as possible and accomplish them quickly vs long smooth zooms. If multiple zoom levels are required the best results can be obtained by including a mix of intermediate zoom levels, rather than e.g. switching back and forth between 10x and 1000x.
Stabilization - Optical or mechanical stabilization is welcome, however un-necessary. As long as your frames are crisp and clear of distortion they do not need to appear smooth in video form. Digital stabilization is not recommended and should be disabled.
Color profiles and video filters - We recommend using your camera's standard picture profile. Hivemapper does not currently benefit from some of the more robust, flat pictures profiles like LOG or Cinema-D, etc. Any additional brightness or sharpening modifications should be disabled.
Resolution/Frame-rate - Hivemapper doesn't sample more than a few frames a second so practically any video frame-rate gives Hivemapper more than enough data for a high quality reconstruction. Hivemapper can, however, use any additional resolution you can throw at it when processing in high quality mode. If your equipment offers a trade off between resolution and framerate we recommend favoring resolution.
Optional Metadata - Some camera systems can record optional metadata including GPS location information. Turn these features on whenever possible.
Aerial coverage and flight paths
Hivemapper intelligently searches your video for any usable frames so when it comes to collection even random, unplanned missions have the ability to generate accurate maps. Here are some tips to help you get the most out of your collection:
1. Basic Concepts
Cover every surface from multiple angles. If a spot is not captured by the video from multiple perspectives, we can’t locate it in 3D space. Think of the camera’s field of view as a paintbrush, where strokes are required from multiple angles to get paint into all the little nooks and crannies of the ground.
Keep the camera angled down. Ignore everything you know about framing and shot composition. Hivemapper works by tracking objects and how they move in relation to each other. The sky has no tracking points and objects farther down the horizon will be too far away to accurately track.
Avoid quick rotations and hovering in place. - Remember - we need multiple perspectives and turning the camera in place does not do that. Instead fly forward while turning slowly or, for quicker turns, turn sideways while moving around a point of interest. Always keep moving for best results.
2. Height and framing
The altitude at which you should fly is determined by the 3D details which you hope to capture, your camera’s lens setup, and recording resolution. Below are a few examples of what your image should look like depending on what details you are trying to map. Examples are from a DJI Phantom 4 camera with a 24mm lens (35mm equivalent).
Wide - With this POV you will be able to map large structures like houses and large trees and bushes in detailed 3D. Items as small as cars will also appear in 3D and produce Change Detection results, however they will likely appear as simplified blobs or fused to neighboring objects making them harder to identify. You should not expect to find narrow objects like fences, utility poles, or minor changes in plant growth, mapped in 3D. This example was shot at 400ft AGL.
Medium - With this POV you will able to map most objects and structures at least a foot wide in 3D. That means, on buildings, you should see details like new solar panels or new AC equipment show up in Change Detection. You should be able to detect plant growth and stationary cars with a high degree of detail. Changes on the ground such as growing piles of dirt or excavation can also been seen at this level in relatively high detail. This example was shot at 280ft AGL.
Close - With this POV you can map even small objects, under a foot wide, in 3D. You should choose this level if you hope to map narrow objects like fences and utility poles. Random smaller objects like supplies or traffic cones can also be mapped as well as subtle changes like plant growth or terrain shifts. This example was shot at 150ft AGL.
Orbits are excellent for mapping a single object or area. Orbiting an object or area multiple times while shifting your altitude and orbit radius will yield even greater results. This type of collection is ideal and will generally produce the most detailed and reliable results. This collection pattern is also easily achievable at any altitude.
Just like mowing a lawn, the idea here is to cover every bit of ground with minimal overlap. A lawnmower style collection is best when you are trying to map large areas as efficiently as possible. If using DJI consumer drone’s we recommend reading more about this type of collection through our autonomous collection guide. A lawnmower flightpath is best suited to aircraft flying under 2000ft AGL.
Many video cameras produce metadata containing information about their location and camera settings. This metadata is helpful for building accurate maps. Hivemapper automatically extracts metadata from a wide variety of cameras. Video cameras produce this metadata in different formats:
Traces.CSV is a simple video metadata format defined by Hivemapper. If Hivemapper does not support a specific metadata format you can translate the unsupported format into the Traces.CSV format and then upload the file alongside the original video file.
Key Required Description Units Example Value sensorLatitude Required Sensor Latitude. Based on WGS84 ellipsoid. Degrees 60.17682266 sensorLongitude Required Sensor Longitude. Based on WGS84 ellipsoid. Degrees 128.4267578 timestamp Required Represented in the number of microseconds elapsed since midnight (00:00:00), January 1, 1970 not including leap seconds. Microseconds 1442942949817896 sensorTrueAltitude At least one altitude field is required Altitude of sensor as measured from Mean Sea Level (MSL) Meters 14190.71973 sensorGroundAltitude Altitude of sensor as measured from the ground Meters 14190.71973 sensorWGS84Altitude Altitude of sensor as measured from the WGS84 ellipsoid Meters 14190.71973 sensorLaunchAltitude Alttiude of sensor ans measured from the launch point Meters 14190.71973 sensorHorizontalFov Optional Horizontal field of view of selected imaging sensor. Degrees 144.5713043 sensorVerticalFov Optional Vertical field of view of selected imaging sensor. Degrees 152.643631 timeframeBegin Optional Timeframe that data maps to in video, relative to beginning of video. For example, if the data stream starts 1 second into the video feed and the first entry is 2 seconds long, then timeframeBegin=1 timeframeEnd=3 Seconds 1.12 timeframeEnd Optional Seconds 2.25
Video cameras often produce metadata in the form of an SRT file. The metadata in the SRT file describes the location, camera attributes, and timestamp
Below is a snippet from an SRT file produced by the camera on a DJI Phantom 4. As you can see it’s generating metadata every second:
00:00:01,000 --> 00:00:02,000
HOME(-122.2090,37.4178) 2016.10.09 15:55:40
ISO:100 Shutter:400 EV: 0 Fnum:F2.8
00:00:02,000 --> 00:00:03,000
HOME(-122.2090,37.4178) 2016.10.09 15:55:41
ISO:100 Shutter:400 EV: 0 Fnum:F2.8
Video Camera Produces SRT metadata Hivemapper Automatically Extracts DJI Phantom 3 ✓ (as file) ✓ DJI Phantom 4 ✓ (as file) ✓ DJI Mavic Pro ✓ (as file) ✓ DJI Phantom 4 Pro ✓ (embedded) ✓ DJI Mavic Pro 2 ✓ (embedded) ✓ Inspire 2 ✓ (embedded) ✓
Embedded metadata means the video will not produce a separate file; rather the metadata sits inside of the video stream and Hivemapper will automatically extract it once you upload the video.
If you are aware of other video cameras that produce SRT metadata that you want to use with Hivemapper, please contact us.
Many video cameras embed metadata in the video they produce in the form of MISB. More specifically, the KLV format is defined by MISB standards.
Below is a snippet of MISB generated metadata produced by the FLIR StarSafire 380HDc that Hivemapper will automatically extract and convert to JSON:
"checksum" : 25668,
"frameCenterElevation" : 43.150989532470703,
"frameCenterLatitude" : 37.9351806640625,
"frameCenterLongitude" : -122.40153503417969,
"imageSourceSensor" : "FLIR SS380-HD HDEO",
"platformHeadingAngle" : 59.019454956054688,
"platformPitchAngleShort" : 4.197998046875,
"platformRollAngleShort" : -4.6966552734375,
"sensorHorizontalFov" : 8.5200271606445312,
"sensorLatitude" : 37.928791046142578,
"sensorLongitude" : -122.40070343017578,
"sensorRelativeAzimuthAngle" : 287.7613525390625,
"sensorRelativeElevationAngle" : -35.492134094238281,
"sensorRelativeRollAngle" : 0,
"sensorTrueAltitude" : 754.3099365234375,
"sensorVerticalFov" : 4.7928586006164551,
"slantRange" : 1007.9564819335938,
"targetWidth" : 151.06431579589844,
"timestamp" : 1519414443032479,
"uasLocalSetVersion" : 4
Hivemapper automatically extracts MISB metadata from some video cameras:
Video Camera Produces MISB metadata Hivemapper Automatically Extracts FLIR StarSafire 380HDC ✓ ✓ Video Sensor for Shadow 200 RQ-7B ✓ ✓ Raytheon MTS-B ✓ ✓ Wescam MX-15 ✓ ✓
While the MISB standard sets the format for the KLV metadata some video manufacturers modify this format. Hivemapper works with certain video camera manufacturers like FLIR to support the modified version.
- No Video Metadata available
If your video does not include any metadata you will be asked to provide a Location Estimate in order for your map to be georegistered. Learn more about adding a Location Estimate here.
Autonomous collection using DJI drones
Creating detailed and accurate maps with Hivemapper can be easily accomplished by flying any drone equipped with a video camera. However, if you want your drone to map an area as efficiently as possible we recommend pre-planning your flights and allowing your drone to fly autonomously using an app like Litchi. As always, it is important that you are confident in controlling and operating both your aircraft and the tools mentioned in this guide before flying. We highly recommend that you only use this guide for drones equipped with forward sensing obstacle avoidance. Depending on your programmed flight and the surrounding terrain, you could lose connection to the drone mid-flight. Be sure to take that into consideration when planning your flight and if you are uncomfortable with any aspect of operation DO NOT FLY.
1. What is Litchi
Litchi is a 3rd party mobile app designed for automated waypoint flying for most DJI drones. Using the app, it is possible to pre-program a flight path and copy and paste it to the map wherever collection is needed. This allows a drone operator to arrive on location and fully cover an area with the press of a few buttons. To get started download Litchi from the App or Play store.
2. Install Litchi
Once installed, register a username or login to the app by clicking the FPV button on the top left and selecting Log In. The app will primarily be used for controlling the drone via a USB connection to the controller.
3. Plan your missions on a computer
For the initial planning of the missions you will need to use Litch’s Mission Hub by visiting flylitchi.com/hub on a computer.
Login via the button in the top right corner with the same account you set up in the app.
Next you’ll want to import one of our flight paths. Click Missions in the bottom left corner and select import. Download our flight path and browse to select it in the Import window.
This mission fully covers a 600m by 550m (0.33sqkm) area and consists of 7.2km of flight. This will take roughly 19 minutes excluding takeoff, landing, and travel to and from your launch point. This mission is designed to be ideal for a Phantom 4 or Mavic Pro drone with a fair amount of flexibility to select a launch point within a thousand meters of the perimeter of the mission. The mission can also be used with other models, like the phantom 3 or Inspire series, however battery life of any other models should be taken into consideration. In the event a programmed flight is too long to be completed your drone will cancel the flight when it reaches it's low battery RTH (Return to Home) threshold.
The first thing you will want to do is verify the imported flight path. Select the Settings button on the bottom left of the screen and verify the settings. With the Heading Mode set to TNW (To Next Waypoint) the aircraft will always be facing and flying forward. Finish Action should be set to RTH (Return to Home) so the aircraft returns and lands immediately after the mission is complete. Path Mode should be set to Curved Turns and lastly the Enable Elevation Features box should be checked.
Next verify the waypoints. When using curved turns only the first and last waypoints will use Actions and some older models of drones such as the P3 may not carry out these actions reliably. -65° is the optimal camera angle for recording in this lawn mower style pattern. Start Recording trigger begin's recording and the Stay For command gives a little extra time for recording to start and focus to set. If you have a drone that does not respond to these first and last triggers you can manually position the camera down to the desired angle as well as start recording either prior or directly after reaching waypoint 1.
Verify that the final waypoint also has its Stop Recording action in place.
Now take a quick look at the altitude settings of all waypoints. Altitudes can be quickly read by the numbers floating above each waypoint. The number in yellow being the altitude as set by the user and the number in white being the actual altitude the drone will fly at to compensate for terrain changes. If you do not see 2 numbers verify that the Above Ground box is checked under the Altitude input.
Unfortunately, Litchi makes the assumption that your launch point is directly under, or at least at the same elevation, as waypoint 1. So if the ground where you are launching is considerably lower than the ground under waypoint 1 then your drone will be flying lower than 80 meters above the ground throughout the missions.
Waypoint 1 protrudes off the side of the mission so that you can drag it directly to your intended launch point if there are any elevation concerns.
The optimal altitude to fly at in most condition is 80 meters above ground. Tall trees, buildings, and hilly terrain can mean that sometimes this number is too low to safely fly. Always scout the area before flying to ensure there are no tall objects of concern and, if needed, raise the altitude. You can raise the number of all waypoints by holding <Ctrl> and left clicking 2 waypoints. A Batch Settings window will come up and you can then select all waypoints, adjust the altitude, and hit Apply.
You can now take the mission and move it to wherever you need to fly. Select the move button in the bottom left corner and then navigate on the map to your objective location. Single left-click on the map will move the flight path to place waypoint 1 on the targeted spot. Once you have positioned the flight path where you want it click Missions and save the file with a unique name.
Remember to unselect the move tool and drag and drop waypoint 1 to your planned launch location if there are any elevation concerns.
For larger areas it may be necessary to tile missions across the map. Due to Litchi’s lack of an "undo" button it is often easiest to open 2 Mission Hub windows and move the flight paths to line them up side-to-side across the map.
4. Fly your mission
Plug your mobile device into your drone’s controller. You should be prompted to allow the device access to your phone with an option to open Litchi. If DJI Go or another app is opened automatically you need to go into your device settings and clear the default for this USB connection. Once Litchi is open and connected click the FPV button in the top left of the screen and select Waypoint.
Click the file button and load your target mission.
The mission will load on the map with a flight path connected to your home point which represent the travel to the mission. There is also a red circle around your home point that designates Litchi’s default "Safe Area Radius" which is set to 500m. As long as some part of your flight path is within a 1000m radius the mission should be able to be completed prior to triggering the low battery return home feature. Controller signal range is much more limited so be sure to pick a wide open launch point to ensure as much of the flight is within radio contact as possible.
Check directly above your drone for takeoff obstacles and when clear press the play button followed by GO.
It is recommended when flying missions that you monitor the camera feed to confirm the altitude above ground and monitor for unexpected obstacles or problems. If radio contact is lost it will likely periodically return as the mission continues it’s back and forth pattern. During this time the battery level will show 0%. The drone will cancel the mission and return home if the battery gets too low or will return home once the mission is complete.
Enable metadata on DJI products
Some camera products capable of recording detailed metadata do not record this information by default. To enable SRT’s on DJI products:
- Open the DJI Go app.
- Open the camera settings menu.
- Switch to the third sub menu (this will be a gear or wrench icon).
- Enable Video Captions.
It is recommended you do a test and verify that a corresponding SRT file is being produced for each clip. Be sure to include both these files when uploading to Hivemapper.com. Enabling video in DJI go will carry over to 3rd party controller apps such as Litchi.