Saturday, September 20, 2025

 Drone Video Sensing Analytics Extension 

The extensions to video sensing analytics is a key value proposition for end-user who would like to avoid repeated processing of every image in an input aerial drone video to get the same or better insights into the drone world with faster and more interactive querying. The user can use any library of their choice.  

For example: 

  1. This sample customizes videoindexing from the default provided by the drone video sensing platform: 

from scenedetect import detect, ContentDetector 
 
video_path = 'drone_footage.mp4' 
 
# Detect scenes in the video 
scene_list = detect(video_path, ContentDetector()) 
 
# Print out the scene (segment) information 
for i, scene in enumerate(scene_list): 
    print(f"Scene {i+1}:") 
    print(f"  Start Time: {scene.get_timecode()} / Frame {scene.frame_num}") 
    print(f"  End Time:   {scene[1].get_timecode()} / Frame {scene[1].frame_num}") 

  1. To customize video processing: 

import subprocess 
import os 
 
def run_opendronemap(images_folder, output_folder): 
    """ 
    Runs OpenDroneMap pipeline on a folder of aerial images to generate a point cloud. 
    
    Args: 
        images_folder (str): Path to folder containing drone images (.jpg, .png). 
        output_folder (str): Path where results will be saved. 
    """ 
    if not os.path.exists(output_folder): 
        os.makedirs(output_folder) 
    
    # Command to run ODM 
    command = [ 
        'docker', 'run', '--rm', 
        '-v', f"{images_folder}:/images", 
        '-v', f"{output_folder}:/odm_output", 
        'opendronemap/odm', 
        '--project-path', '/odm_output', 
        '--images', '/images' 
    ] 
    
    subprocess.run(command, check=True) 
    print(f"Processing finished. Check point cloud files in {output_folder}/odm_output") 
    
run_opendronemap('./drone_images', './odm_results') 


No comments:

Post a Comment