场景是在2楼我们固定了一个摄像头,然后实现yolo检测行人,并把行人的gps坐标试试显示出来
下面附上部分代码:
import math,os
m_nScreenResolution_l = 640;
m_nScreenResolution_h = 480;
m_dScreenResolution_angle = 90/640
m_dPlane_kappa = 0;
m_dPlane_phi = 0;
m_dPlane_omega = 0;
# 摄像头高度
m_dFixed_elevation = 30;
m_dTarget_elevation = 0;
location =(31.253190,121.495568)
# 摄像头gps位置
m_dFixed_longitude = 119.4461939288;
m_dFixed_latitude = 32.3946498603;
# 偏航角
m_dCamera_kappa = 177;
# 俯仰角
m_dCamera_phi = 25;
m_nPic_x = 800
m_nPic_y = 556
PI = math.pi
path1 = '/data/drone_detect/detection_track/yolo_drone/190809/txt/'
# path2 = './correction_txt/'
path3 = '/data/drone_detect/detection_track/yolo_drone/190809/weizhi/'
txtfiles = os.listdir(path1)
txtfiles = sorted(txtfiles)
for file in txtfiles:
file1 = file
print(file1)
with open(path3+f