Select to view content in your preferred language

Adding a video to oriented imagery catalog

3263
11
10-13-2021 10:45 PM
PeterMacKenzie2
Frequent Contributor

I am attempting to add a mp4 video to an Oriented Imagery Catalog (v2.7) in Pro (2.8.3) using an external csv table for metadata. This is mostly blank other than these key fields. 

UnixTimeStampSensorLatitudeSensorLongitudeSensorEllipsoidHeight

 

Is this even possible or do I need the image analyst extension and then follow the Full Motion Video (FMV)/multiplex documentation?

I'm following the OrientedImageryCatalogManagement_UserGuide.pdf but there is very little info about how to do what I am trying to do. 

Note: I am currently getting this error: Log attached, Metadata File attached. 

Calling GeospatialVideo
Error in processing images. name 'log' is not defined

note:  i've been able to add images OK. 

 

Tags (1)
0 Kudos
11 Replies
PeterMacKenzie2
Frequent Contributor
0 Kudos
GordonSumerling
Esri Regular Contributor

Peter,

Looking at your .CSV there is not enough infomation in the columns to proces the video.  My understanding is that all columns need to be populated as in my example from PH4

UnixTimeStampSensorLatitudeSensorLongitudePlatformHeadingPlatformPitchPlatformRollSensorEllipsoidHeightHorizontalFOVVerticalFOVSensorRelativeAzimuthSensorRelativeElevationSensorRelativeRoll
1.60229E+1538.00225721-122.2073802236.7-19.70.3139.122518.9520.4815.645.34
1.60229E+1538.00225693-122.2073809236.5-21.50.2139.122518.9519.4718.746.18
1.60229E+1538.00225643-122.2073821236.5-22.10.2139.122518.9518.4420.556.48
1.60229E+1538.00225594-122.2073836236.4-22.40.2139.122518.9517.2321.256.22
1.60229E+1538.00225505-122.2073854236.4-22.60.2139.122518.9516.1921.645.92
1.60229E+1538.00225401-122.2073875236.2-22.50.1139.122518.9515.2521.935.62
1.60229E+1538.00225271-122.20739236.1-22.60139.122518.9514.5321.875.42
1.60229E+1538.00225101-122.2073922235.9-22.60.1139.122518.9513.93225.31
1.60229E+1538.00224918-122.2073955235.7-22.70.2139.122518.9513.3622.075
0 Kudos
PeterMacKenzie2
Frequent Contributor

what is PH4?
There is an example from a Garmin Virb here. Are you thinking that data from a Virb has all that metadata?
I guess I'm not sure if it's possible to load Video from a consumer grade camera (GoPro + GPX string) into an OIC or if you HAVE to have other metadata from your sensor.
I wonder if you can just fudge all those values if they haven't been captured from your device?

 

0 Kudos
RandallRebello
Frequent Contributor

Hi Peter, 

First of all apologies for the late reply. But the issue you are facing has been fixed. I had a look at the csv file you have given... and you need to have values in those empty columns. 

PlatformHeading is used to for the heading of the camera.  (If there is a gimbal mount you would also have a value for SensorRelativeAzimuth. But since you dont, you can just remove this column. 

PlatformRoll along with SensorRelativeRoll (if gimbal mounted) is used to calculate the Roll. 

You seem to have a Pitch value. SensorRelativeElevation (if gimbal mounted) is also used to calulate the Pitch. 

 HorizontalFOV and VerticalFOV is used to calculate the coverage area of the video. 

These values are required.  Normally we would allow you to use default values but because of the complexity of the requirements it was skipped for this initial version. So my suggestion is that you will the default values in the empty fields in your CSV and run it with the updated code. 

The updated code can be found in Github. If you are not familiar with github follow these steps,

1. Go to  https://github.com/Esri/oriented-imagery

2. Download the repository. See screen below.  highlighted in yellow.

RandallRebello_0-1634732987950.png

3. from downloaded zip Extract GeospatialVideo.py & GeospatialVideo.oitype files

4. Copy extracted files  to  c:\Image_Mgmt_Workflows\OrientedImagery\Types folder. 

 

5. If you have Pro open.. Make sure to close it before using the updated oitype. 

Let me know how it goes. 

Randall 

PeterMacKenzie2
Frequent Contributor

Thanks @RandallRebello . I put some dummy values in the csv and it now doesn't have that log error.
However it is only creating one Exposure Point. My csv has 135 rows and spans 12 minutes.  I've tried Imagerytype=GeospatialVideo_Defaults (not mentioned in documentation) and also Imagerytype=Terrestrial Video.  

python command line copy for reference

arcpy.ManageOrientedImagery.AddImagesToOrientedImagery("OIC_5", "GeospatialVideo", None, None, '', "https://elevation.arcgis.com/arcgis/rest/services/WorldElevation/Terrain/ImageServer", "None", r"'Metadata File' D:\SANDBOX\vidsample\TrainFilm2\oic_ready_table_from_gpx.csv;'Video File' D:\SANDBOX\vidsample\vid\tc.mp4;'Frames Step (In Seconds)' 2", "Terrestrial Video", "Video", "0", "90", "0", "0", '', "1.8", "2", "30", "50", "0")

 

0 Kudos
RandallRebello
Frequent Contributor

Hi Peter, 

Just putting dummy values will not work.  Each record in the input file should correspond to a location of where the camera is and at what time in the video. Ideally the metadata file will have a record for each frame or frame interval, which has the  X and Y coordinates, the camera heading, pitch, roll, and the unixtimestamp. The unixtimestamp helps when adding it to the OIC (It reads the time stamp, and based on the input interval figures out which record has to go into the OIC.) This data would not be so easy to fake.  

I would like to help you out, so if you can give me a better understanding of the source of this video file. What software you use to capture/process it. That would help. I can get one of my colleagues who is more proficient in drone imagery to help you out. 

Randall 

0 Kudos
adevadas
Emerging Contributor

Try setting the 'Frames Step (In Seconds)' to 0. I had the same problem where only one Exposure Point was being created when I tried both 1 and 2 seconds. Then when I tried 0 seconds, all the Exposure Point's were present. 

I am using the OIC in ArcGIS Pro though, not ArcPy. 

 

0 Kudos
PeterMacKenzie2
Frequent Contributor

Yes this is part of my question. Can I achieve an OIC video (like the Garmin Virb motorbike example) with what I have.

I have:
mp4 captured from a PTZ camera and;
a separate gpx string captured from a mobile device.

What do I have to do to make this work or is it possible?

My current csv is built from the gpx file with: UnixTimeStamp (every 5 or 6 seconds) SensorLatitude SensorLongitude SensorEllipsoidHeigh

My plan was to ignore heading, FOV, HOV for now by just using dummy values because I actually don't really need these (a moving dot on the map is fine with no FOV really needed) so can work them out later if i get part this first step. I realize this might be the wrong approach.

My video has timestamp data of some sort in the EXIF metadata (i think)

In short, steps to marry up a gpx with an mp4 and push to an OIC like the Garmin Virb example. 

I will DM you a link to the files too.

thanks.

0 Kudos
RandallRebello
Frequent Contributor

Hi Peter, 

If you can provide me samples of the data I can have a look. And like I said I will forward you query to a colleague of mine and see how we can come with a solution for you. 

Randall 

0 Kudos