赞
踩
大疆的飞行姿态数据是在照片的XPM数据段中
from pyexiv2 import Image
file_name = r'C:\Users\Administrator\Desktop\DJI_0505.JPG'
test = Image(file_name)
f = test.read_xmp()
print(f)
print(f["Xmp.tiff.Model"]) # 相机型号
print(f["Xmp.drone-dji.AbsoluteAltitude"]) #绝对高度
print(f["Xmp.drone-dji.RelativeAltitude"]) #相对高度
print(f["Xmp.drone-dji.GpsLatitude"]) #纬度
print(f["Xmp.drone-dji.GpsLongtitude"]) # 经度
print(f["Xmp.drone-dji.GimbalRollDegree"]) #roll
print(f["Xmp.drone-dji.GimbalYawDegree"]) # yaw
print(f["Xmp.drone-dji.GimbalPitchDegree"]) # pitch
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。