Browse Source

老影棚的自动做坐标,做好自动上传

master
dongchangxi 12 months ago
parent
commit
f1afdd9920
  1. 14
      old_to_new_build/tools_to_xmps.py

14
old_to_new_build/tools_to_xmps.py

@ -165,14 +165,24 @@ def create_rate_xmps(pid): @@ -165,14 +165,24 @@ def create_rate_xmps(pid):
{libs.get_defineDistances(psid)} -update -align -align {config.r2["setRegion"]} \
{exportxmp} \
-exportReconstructionRegion "{os.path.join(config.workdir, pid, f"{pid}.rcbox")}" \
-save "{os.path.join(config.workdir, pid, f"{pid}.rcproj")}"'
-exportRegistration "D://{pid}/xmps_reg/{pid}_registration.out" "D://make2/config/registration_export_config.xml" \
-save "{os.path.join(config.workdir, pid, f"{pid}.rcproj")}" -quit'
print(cmd)
cmd = shlex.split(cmd)
res = subprocess.run(cmd)
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} {pid} photo2相机位姿完成,共费时{libs.diff_time(start_time)}')
#从 D://{pid}/xmps_reg/ 中获取对齐数量
xmpAligns = 0
for file in os.listdir(os.path.join(config.workdir, pid, 'xmps_reg')):
if file.endswith('.jpg'):
xmpAligns += 1
upload_or_not = input('是否上传oss?(y/n)')
#判断对齐数量是否和 照片总数一样
if xmpAligns == (photos1_count+photos2_count):
upload_xmp(pid)
else:
upload_or_not = input(f'当前照片总数{photos1_count+photos2_count},对齐数量{xmpAligns},没有全部对齐,是否上传oss?(y/n)')
if upload_or_not == 'y':
upload_xmp(pid)

Loading…
Cancel
Save