1
General / Re: Export initial camera positions PRIOR to alignment
« on: August 19, 2019, 11:57:27 AM »
Thanks for the prompt response Paulo, that was exactly what I was looking for. I had just been looking in the wrong locations..
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
I have been doing some testing with the new P4R and getting some good results. I can't seem to enter the DJI dewarp Xmp data so that it means anything to Metashape, has anyone else yet? The auto adjusted camera parameters seem to been getting pretty good accuracy without GCP and even better just using 1 GCP.
Was flown with D-RTK2 base over known point shot with Trimble R10, lens correction turned off in RTK app. Ground control also shot with R10.
Coordinates converted to OSGB1936 in metashape before alignment and loading GCP.
I have tried to do a lens calibration with the chessboard in metashape but get very different parameters than what I see after a flight and optimisation. Anyone else been able to calibrate the P4R lens successfully with metashape?
Without running the optimisation the Z error is over 21cm but down to 6cm after. Using just one GCP tightens things up further to less than 3cm.
See reports https://drive.google.com/drive/folders/1LekTi82gf9Vq4cYkg_4s79YTnccYmgrr?usp=sharing
Let me know your thoughts.
Cheers
Hello BobvdMeij,
When the information is imported from CSV file the data for the corresponding instance in the Reference pane is completely re-written. So it doesn't just update a few selected fields.
Maybe you can export complete information from the Reference pane, then perform XYZ modification and import the data back?
Hello Steve,
The accuracy values for the coordinates should be properly read from XMP, providing that you have enabled "Load camera location accuracy from XMP meta data" in the Advanced preferences tab.
If it doesn't happen, please provide any example of the image that you are using (either via forum or via email to support@agisoft.com).
Hello BobvdMeij,
Camera locations coordinates (Lat, Long and Altitude) are loaded from image EXIF, so the data from XMP is not loaded to the Reference pane, Relative and Absolute Altitude values are loaded to the camera.photo.meta and are stored in the project file, just for case anyone wants to use them.
The following script example will print out to the console the required tags for the cameras in the active chunk:Code: [Select]import Metashape
from xml.dom import minidom
elements = ["drone-dji:AbsoluteAltitude=", "drone-dji:GpsLatitude=", "drone-dji:GpsLongtitude="]
chunk = Metashape.app.document.chunk #active chunk
for camera in chunk.cameras:
path = camera.photo.path
with open(path, "rb") as file:
image = file.read()
string = str(image)
xmp_start = string.find('<x:xmpmeta')
xmp_end = string.find('</x:xmpmeta')
file.close()
if xmp_start != xmp_end:
xmpString = string[xmp_start : xmp_end + 12]
print(camera.label)
for element in elements:
try:
value = string[string.find(element) + len(element) : string.find(element) + len(element) + 10]
value = float(value.split('\"',3)[1])
print(element, value)
except IndexError:
print(element, " not found")
The external coordinate information can be loaded from the text file to the Reference pane or loaded via another script.
Hello BobvdMeij,
If you want to do it directly in Metashape, then a simple Python script can be used that will save to text file the information from camera.photo.meta (extracted automatically be the application) or (with a bit more complex script) would look into the source images XMP to find the needed tag.
Do you have a list of tags that you would like to output?
The latest screenshot is again related to "Palette" raster transformation applied to the exported DEM - it contains Red, Green and Blue channels and alpha-channel with the transparency. Can you please open the DEM exported without any raster transformations applied and check the "table" view mode in the "Identify results" frame?
Is this?