|
|
|
@ -139,6 +139,7 @@ def create_rate_xmps(pid): |
|
|
|
-addFolder "{os.path.join(config.workdir, pid, "photo2")}" -selectAllImages \ |
|
|
|
-addFolder "{os.path.join(config.workdir, pid, "photo2")}" -selectAllImages \ |
|
|
|
-align -align -align -align -align \ |
|
|
|
-align -align -align -align -align \ |
|
|
|
{exportxmp} \ |
|
|
|
{exportxmp} \ |
|
|
|
|
|
|
|
-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' |
|
|
|
-save "{os.path.join(config.workdir, pid, f"{pid}.rcproj")}" -quit' |
|
|
|
print(cmd) |
|
|
|
print(cmd) |
|
|
|
cmd = shlex.split(cmd) |
|
|
|
cmd = shlex.split(cmd) |
|
|
|
@ -146,26 +147,16 @@ def create_rate_xmps(pid): |
|
|
|
# TODO:加入report相机位姿质量评估 |
|
|
|
# TODO:加入report相机位姿质量评估 |
|
|
|
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} {pid} photo1相机位姿完成,共费时{libs.diff_time(start_time)}') |
|
|
|
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} {pid} photo1相机位姿完成,共费时{libs.diff_time(start_time)}') |
|
|
|
|
|
|
|
|
|
|
|
# for xmp in os.listdir(photo1_path): |
|
|
|
#判断是否对齐了所有的相机 |
|
|
|
# if xmp.endswith('.xmp'): |
|
|
|
alignNums = 0 |
|
|
|
# shutil.copy(os.path.join(photo1_path, xmp), os.path.join(photo2_path, xmp.replace('_1.xmp', '_8.xmp'))) |
|
|
|
for file in os.listdir(os.path.join(config.workdir, pid, 'xmps_reg')): |
|
|
|
|
|
|
|
if file.endswith('.jpg'): |
|
|
|
# psid = libs.getPSid(pid) |
|
|
|
alignNums += 1 |
|
|
|
# cmd = f'{config.rcbin} {config.r2["init"]} -setInstanceName {pid} \ |
|
|
|
|
|
|
|
# -load "{os.path.join(config.workdir, pid, f"{pid}.rcproj")}" {config.r["setTextureFalse"]} \ |
|
|
|
if alignNums == 26: |
|
|
|
# -addFolder "{os.path.join(config.workdir, pid, "photo2")}" -selectAllImages \ |
|
|
|
upload_xmp(pid) |
|
|
|
# -detectMarkers "D:\\make2\\config\\detectMarkers.config.xml" \ |
|
|
|
else: |
|
|
|
# {libs.get_defineDistances(psid)} -update -align -align {config.r2["setRegion"]} \ |
|
|
|
upload_or_not = input(f'当前照片数量为{photos2_count},对齐数量为{alignNums},是否上传oss?(y/n)') |
|
|
|
# {exportxmp} \ |
|
|
|
|
|
|
|
# -exportReconstructionRegion "{os.path.join(config.workdir, pid, f"{pid}.rcbox")}" \ |
|
|
|
|
|
|
|
# -save "{os.path.join(config.workdir, pid, f"{pid}.rcproj")}"' |
|
|
|
|
|
|
|
# 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)}') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
upload_or_not = input('是否上传oss?(y/n)') |
|
|
|
|
|
|
|
if upload_or_not == 'y': |
|
|
|
if upload_or_not == 'y': |
|
|
|
upload_xmp(pid) |
|
|
|
upload_xmp(pid) |
|
|
|
|
|
|
|
|
|
|
|
|