Good Afternoon,
I've been doing some testing with the new Oriented Imagery capabilities in AGOL, but I have only managed to upload one test set of data properly. My last couple of attempts have ended up with maps where the OI field-of-view cone points in the opposite direction of the actual view of the photo (pictured below). If this is working as intended, I wonder if some sort of offset can be added to the dataset to better pair the aerial and 360 imagery.
Is there a best practice for adding images to the OIC dataset? I've attempted using a .txt file with the image paths and making a feature layer that follows the OIC table schema. My one successful Oriented Imagery Viewer map was created using the .txt method, but that test was also with a much smaller dataset.
Any information would be a great help and thanks in advance!
@Jaire_McNichols here are 360° Experience Builder widget options that can easily correct image direction. These 360° photo and video solution seamlessly integrates imagery into ArcGIS , offering effortless usability and unmatched workflow customization. The tools facilitate the swift deployment of large-scale 360° imagery projects within hours of collection, with the added advantage of storing video in YouTube or AWS for seamless access via ArcGIS:
https://www.nodeology.net/site-viewer-360-for-arcgis/
https://www.nodeology.net/vidgeo-for-arcgis/
Hi Clark,
It seems to me that you are working with Oriented Imagery Catalogs. Can you also tell me how you added these images. Is it using a FrameTable, or Image list. It seems like you too do not have any heading info defined. If you are using Oriented Imagery catalogs, You can try the calculate heading tool in the Oriented Imagery Management tools. From the pictures I see above you seem to have sequential data so the tool might actually help. You might have to adjust the parameters so it works with your dataset.
Thanks,
Randall
Do we know where the calculate heading tool has gone? Since oriented imagery as been added into ArcGIS Pro base install we seem to have lost most of the OI tools. calculate heading was the most useful tool, where it just automatically calculate the heading to the next image in the OIC. I was able to get the heading value for 1000s of images in seconds. the old GP Tools pyton tool box no longer works (See image). I'm at a loose end with this.
import arcpy
import math
# Set workspace and feature class
arcpy.env.workspace = r"C:\Users\sdada\Documents\ArcGIS\Projects\Street_view\Street_view.gdb" # replace with FGDB containing OIC #
feature_class = "Streetview_ExportFeatures" # Replace with actual feature class name #
heading_field = "CameraHeading" #replace with camera heading field #
# Add Heading field if it doesn't exist
if heading_field not in [f.name for f in arcpy.ListFields(feature_class)]:
arcpy.AddField_management(feature_class, heading_field, "DOUBLE")
def calculate_initial_bearing(lat1, lon1, lat2, lon2):
"""Calculate the bearing between two GPS points."""
delta_lon = math.radians(lon2 - lon1)
lat1, lat2 = map(math.radians, [lat1, lat2])
x = math.sin(delta_lon) * math.cos(lat2)
y = math.cos(lat1) * math.sin(lat2) - math.sin(lat1) * math.cos(lat2) * math.cos(delta_lon)
bearing = math.degrees(math.atan2(x, y))
return (bearing + 360) % 360 # Normalize to 0-360 degrees
# Read features and compute heading
gps_data = []
with arcpy.da.SearchCursor(feature_class, ["OBJECTID", "SHAPE@XY"]) as cursor:
for row in cursor:
gps_data.append({"ID": row[0], "Lat": row[1][1], "Lon": row[1][0]})
#check camera heading field exsists#
fields = [f.name for f in arcpy.ListFields(feature_class)]
print(fields) # Check if "CameraHeading" exists
#check gps data #
print(gps_data) # Debugging check before processing
# Update heading field
updates = {gps_data[i]["ID"]: calculate_initial_bearing(
gps_data[i]["Lat"], gps_data[i]["Lon"], gps_data[i + 1]["Lat"], gps_data[i + 1]["Lon"]
) for i in range(len(gps_data) - 1)}
with arcpy.da.UpdateCursor(feature_class, ["OBJECTID", heading_field]) as cursor:
for row in cursor:
if row[0] in updates:
cursor.updateRow([row[0], updates[row[0]]]) # Assign heading
print("Heading calculation complete! Check the updated feature class.")
Hi Jaire_McNichols,
I had a look at the OIV issuetable.jpg that you have put up here. So it looks like there is no heading defined. If you have a look at the properties of the Oriented Imagery dataset layer in ArcGIS Pro, under the oriented imagery tab there will be a Camera Heading default value. It might just be undefined.
If you added these images using a text file, then its basically read the EXIF data within the image and used the GPS information from there to get the position. However it seems it does not have a heading info. Do you know the source of these images? What camera was used. Can you send me a couple of image so I can try it out.
Thanks
Randall
Thanks for the reply Randall,
The source images contains sensitive information, so I can't share much of it at present. I did read the EXIF data of one of the images using freeware called 'exiftool', and 'Pose Heading Degrees' seems to be the Heading field that I want applied to the 'Camera Heading' field in my OIC. Is there any way that I can get the Oriented Imagery Toolbox to 'detect' this specific metadata field? I would prefer to add images through a text file with a list of image paths, but I worry that this method will not be able to connect the 'Pose Heading Degrees' to 'Camera Heading'
Hi Jaire,
You can do what you are asking by writing what is known as an OIType. If you dont want to write code you can export exif data to a text file, and create a frame table to use as import.
I found this link https://photo.stackexchange.com/questions/24747/is-there-a-free-piece-of-software-that-will-export-m...
It explains how to do it.
You can also have a look at the user documentation of the GPTool (page 11) with regards to the fields required.
Hope this helps.
Randall