360 Video To Oriented Imagery (Indoors)

Summary

Extracts 360-degree images from 360-degree video into an oriented imagery dataset. The output of this tool can be added to floor-aware maps and scenes in ArcGIS Pro.

Usage

  • This tool supports 360-degree MP4 video captured by a 360-degree camera. The video must use an equirectangular representation.

  • The Target Oriented Imagery parameter value must be a z-enabled oriented imagery layer.

    Note:

    Create an oriented imagery dataset using the Create Oriented Imagery Dataset tool.

  • The target oriented imagery layer can be from a local oriented imagery dataset or a hosted feature service. When importing photos to a hosted feature service, the feature service must support feature attachments.

  • Georeference the output features using the Control Point 1 and Control Point 2 parameters. Set the parameter values as follows:

    • Video Time—Specify a video playback timestamp to determine camera location in hh:mm:ss.s format.

      Use timestamps that are at least 5 seconds from the start or end of the video, and at least 5 seconds between control points.

    • Camera Location—Place a point on the map that reflects where the camera was positioned at the specified timestamp.

      Camera locations must be at least 1 meter apart.

    Tip:

    Use control points with the most possible distance between them to increase accuracy when georeferencing.

  • Use the following video extraction parameters to specify how images will be automatically extracted along the video path:

    • Extraction Interval—The amount of time between output images. The default is 2 seconds, which is approximately 4-6 feet (1.2-1.8 meters) of movement at an average walking pace.
    • Start Timestamp—The timestamp to begin extracting images from the video in hh:mm:ss.s format. For example, use a value of 00:15:10 to begin extraction at 15 minutes, 10 seconds into the video. The default is the beginning of the video.
    • End Timestamp—The timestamp to stop extracting images from the video in hh:mm:ss.s format. For example, use a value of 01:10:00 to end extraction at 1 hour, 10 minutes into the video. The default is the end of the video.
    Note:

    The actual start time, end time, and time between extracted images may vary depending on the input video quality.

  • This tool uses visual simultaneous localization and mapping (VSLAM) to determine the relative positions and orientations of the extracted images. The VSLAM accuracy depends on factors including motion blur, the number of trackable locations (edges, corners, textures) in the environment, and camera movement speed.

  • Use the Input Levels Feature parameter to determine how images will be prepared for use with indoor maps. When a value is specified for this parameter, the tool configures output features as follows:

    • If the target oriented imagery layer is already floor aware, the tool stores level ID values in the layer's configured floor field. Otherwise, the tool will store level ID values in the layer's LEVEL_ID field. The tool will add the LEVEL_ID if needed.
    • If control points are not specified, output features are moved and scaled to the extent and elevation of the selected Levels feature. All output features are assigned the level ID value of the selected Levels feature.
    • With control points specified, output features are georeferenced (moved, rotated, and scaled) based on the control points. Georeferenced features that are within the selected Levels feature are assigned that level's ID and elevation; features outside the level are assigned an ID of Null and an elevation of 0.

Parameters

LabelExplanationData Type
Input 360 Video

The input .mp4 file containing 360 video from which 360 images will be extracted.

File
Target Oriented Imagery

The target oriented imagery layer to which features will be added.

Oriented Imagery Layer
Target Image Folder

The existing folder where the imagery files will be written.

Folder
Control Point 1
(Optional)

The first control point that will be used to georeference the output features.

  • Video Time—The video timestamp in hh:mm:ss.s format.
  • Camera Location—The point feature representing the camera's location in the map at the specified video timestamp.

Value Table
Control Point 2
(Optional)

The second control point that will be used to georeference the output features.

  • Video Time—The video timestamp in hh:mm:ss.s format.
  • Camera Location—The point feature representing the camera's location in the map at the specified video timestamp.

Value Table
Input Levels Feature
(Optional)

The input Levels layer from the Indoors Model that contains a selected level feature. The tool assigns the LEVEL_ID value from the selected level feature to the level ID field of the output oriented imagery feature.

Feature Layer
Extraction Interval
(Optional)

The interval at which images will be extracted from the input video. You can select an interval unit of Milliseconds, Seconds, or Minutes. The default is 2 seconds, and the minimum is 0.2 seconds (200 milliseconds).

Time Unit
Start Timestamp
(Optional)

A starting point in the video to begin extracting images. Accepted input is in hh:mm:ss.s format.

String
End Timestamp
(Optional)

An ending point in the video to finish extracting images. Accepted input is in hh:mm:ss.s format.

String

Derived Output

LabelExplanationData Type
Updated Oriented Imagery

The updated oriented imagery dataset. Existing oriented imagery data will be retained during the import. A new point feature will be appended for each image in the input data, with the associated image added as an attachment. Attributes will be set on new point features based on attributes of the input image file.

Oriented Imagery Layer
Updated Imagery Folder

The updated folder where the imagery files will be written.

Folder

arcpy.indoors.ThreeSixtyVideoToOrientedImagery(in_360_video, target_oriented_imagery, target_image_folder, {control_point_1}, {control_point_2}, {in_levels_feature}, {extraction_interval}, {start_timestamp}, {end_timestamp})
NameExplanationData Type
in_360_video

The input .mp4 file containing 360 video from which 360 images will be extracted.

File
target_oriented_imagery

The target oriented imagery layer to which features will be added.

Oriented Imagery Layer
target_image_folder

The existing folder where the imagery files will be written.

Folder
control_point_1
[control_point_1,...]
(Optional)

The first control point that will be used to georeference the output features.

  • Video time—The video timestamp in hh:mm:ss.s format.
  • Camera location—The point feature representing the camera's location in the map at the specified video timestamp.

Value Table
control_point_2
[control_point_2,...]
(Optional)

The second control point that will be used to georeference the output features.

  • Video time—The video timestamp in hh:mm:ss.s format.
  • Camera location—The point feature representing the camera's location in the map at the specified video timestamp.

Value Table
in_levels_feature
(Optional)

The input Levels layer from the Indoors Model that contains a selected level feature. The tool assigns the LEVEL_ID value from the selected level feature to the level ID field of the output oriented imagery feature.

Feature Layer
extraction_interval
(Optional)

The interval at which images will be extracted from the input video. You can select an interval unit of Milliseconds, Seconds, or Minutes. The default is 2 seconds, and the minimum is 0.2 seconds (200 milliseconds).

Time Unit
start_timestamp
(Optional)

A starting point in the video to begin extracting images. Accepted input is in hh:mm:ss.s format.

String
end_timestamp
(Optional)

An ending point in the video to finish extracting images. Accepted input is in hh:mm:ss.s format.

String

Derived Output

NameExplanationData Type
updated_oriented_imagery

The updated oriented imagery dataset. Existing oriented imagery data will be retained during the import. A new point feature will be appended for each image in the input data, with the associated image added as an attachment. Attributes will be set on new point features based on attributes of the input image file.

Oriented Imagery Layer
updated_image_folder

The updated folder where the imagery files will be written.

Folder

Code sample

ThreeSixtyVideoToOrientedImagery example 1 (Python window)

The following Python window script demonstrates how to use the ThreeSixtyVideoToOrientedImagery function in immediate mode.

import arcpy

#Note: Video timestamps are strings in format hh:mm:ss.s

arcpy.indoors.ThreeSixtyVideoToOrientedImagery(r"C:\SiteFootage\Building1_Floor1.mp4", r"C:\Campus.gdb\OIDataset", r"C:\Data\ImagesFolder", 
                                               "", "", "", "", "", "")
ThreeSixtyVideoToOrientedImagery example 2 (Python window)

The following stand-alone script demonstrates how to use the ThreeSixtyVideoToOrientedImagery function.

# Import system modules
import arcpy

# Create temporary control point feature classes in memory for camera locations
sr = arcpy.SpatialReference(102100) # WGS 1984 Web Mercator (Auxiliary Sphere)
arcpy.management.CreateFeatureClass("memory", "point_1_fc", "POINT", spatial_reference=sr)
arcpy.management.CreateFeatureClass("memory", "point_2_fc", "POINT", spatial_reference=sr)

# Add camera locations to the temporary control point feature classes
with arcpy.da.InsertCursor(r"memory\point_1_fc", ["SHAPE@XY"]) as cursor:
    cursor.insertRow([arcpy.Point(-13046063.3, 4036427.6)])
with arcpy.da.InsertCursor(r"memory\point_2_fc", ["SHAPE@XY"]) as cursor:
    cursor.insertRow([arcpy.Point(-13046055.9, 4036422.1)])

# Set local variables

# Set the control point parameter values
# Note: Video timestamps are strings in format hh:mm:ss.s
control_point_1 = ["00:05:40.7", r"memory\point_1_fc"]
control_point_2 = ["00:11:25.3", r"memory\point_2_fc"]

# Specify indoor level for floor awareness
arcpy.management.MakeFeatureLayer(r"C:\IndoorsModel.gdb\Indoor\Levels", "levels_lyr", 
                                  "NAME = 'Building 1 Floor 1'")
in_levels_feature = "levels_lyr"

# Set remaining parameter variables
in_360_video = r"C:\SiteVideos\Building1_Floor1.mp4"
target_oriented_imagery = r"C:\Campus.gdb\OIDataset" 
target_image_folder = r"C:\Data\ImagesFolder"
extraction_interval = "5 Seconds"
start_timestamp = "00:05:35"
end_timestamp="00:15:00"



# Run the tool
arcpy.indoors.ThreeSixtyVideoToOrientedImagery(in_360_video, target_oriented_imagery, target_image_folder, control_point_1, control_point_2, 
in_levels_feature, extraction_interval, start_timestamp, end_timestamp) 

# Release memory
del cursor
arcpy.Delete_management(r"memory\point_1_fc")
arcpy.Delete_management(r"memory\point_2_fc")

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: No
  • Standard: No
  • Advanced: Requires ArcGIS Indoors Pro or ArcGIS Indoors Maps

Related topics