|
|
|
@ -23,7 +23,7 @@ def get_rcver(): |
|
|
|
def make3d(pid): |
|
|
|
def make3d(pid): |
|
|
|
if get_rcver() == 1: # old version |
|
|
|
if get_rcver() == 1: # old version |
|
|
|
#修改重建区域的大小 |
|
|
|
#修改重建区域的大小 |
|
|
|
common.change_rcbox_s(pid,"0.09") |
|
|
|
common.change_rcbox_s(pid,"0.999") |
|
|
|
|
|
|
|
|
|
|
|
simplify_value = 1000000 * libs.getHeadCount(pid) |
|
|
|
simplify_value = 1000000 * libs.getHeadCount(pid) |
|
|
|
add_photo3 = ' ' |
|
|
|
add_photo3 = ' ' |
|
|
|
@ -40,14 +40,14 @@ def make3d(pid): |
|
|
|
res = subprocess.run(cmd) |
|
|
|
res = subprocess.run(cmd) |
|
|
|
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} pid: {pid} 定位点导入完成') |
|
|
|
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} pid: {pid} 定位点导入完成') |
|
|
|
|
|
|
|
|
|
|
|
# defind_distance |
|
|
|
# defind_distance |
|
|
|
|
|
|
|
|
|
|
|
time.sleep(20) |
|
|
|
time.sleep(35) |
|
|
|
shutil.move(os.path.join(config.workdir, pid, f'{pid}_wait.rcproj'), os.path.join(config.workdir, pid, f'{pid}.rcproj')) |
|
|
|
shutil.move(os.path.join(config.workdir, pid, f'{pid}_wait.rcproj'), os.path.join(config.workdir, pid, f'{pid}.rcproj')) |
|
|
|
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} pid: {pid} 定义定位点距离完成') |
|
|
|
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} pid: {pid} 定义定位点距离完成') |
|
|
|
|
|
|
|
#2023-10-27为了解决老版本使用step1 的 重建区域框的问题,这里加入了 -set "sfmEnableCameraPrior=True" -align -set "sfmEnableCameraPrior=False" align 使相机的对齐线统一向下后,再进行重建区域的设置 |
|
|
|
cmd = f'{config.rcbin} {config.r1["init"]} -load "{os.path.join(config.workdir, pid, f"{pid}.rcproj")}" -update \ |
|
|
|
cmd = f'{config.rcbin} {config.r1["init"]} -load "{os.path.join(config.workdir, pid, f"{pid}.rcproj")}" -update \ |
|
|
|
-setReconstructionRegion "{os.path.join(config.workdir, pid, f"{pid}.rcbox")}" \ |
|
|
|
-set "sfmEnableCameraPrior=True" -align -set "sfmEnableCameraPrior=False" align -setReconstructionRegion "{os.path.join(config.workdir, pid, f"{pid}.rcbox")}" \ |
|
|
|
-mvs -modelSelectMaximalConnectedComponent -modelInvertSelection -modelRemoveSelectedTriangles -closeHoles -clean -simplify {simplify_value} -smooth -unwrap -calculateTexture -renameModel {pid} -exportModel "{pid}" "{os.path.join(config.workdir, pid, "output", f"{pid}.obj")}" "d:\\make2\\config\\ModelExportParams102.xml" -quit' |
|
|
|
-mvs -modelSelectMaximalConnectedComponent -modelInvertSelection -modelRemoveSelectedTriangles -closeHoles -clean -simplify {simplify_value} -smooth -unwrap -calculateTexture -renameModel {pid} -exportModel "{pid}" "{os.path.join(config.workdir, pid, "output", f"{pid}.obj")}" "d:\\make2\\config\\ModelExportParams102.xml" -quit' |
|
|
|
print(cmd) |
|
|
|
print(cmd) |
|
|
|
cmd = shlex.split(cmd) |
|
|
|
cmd = shlex.split(cmd) |
|
|
|
|