|
|
|
|
@ -74,14 +74,14 @@ def filter_dark_texture_image(pid):
@@ -74,14 +74,14 @@ def filter_dark_texture_image(pid):
|
|
|
|
|
def detect_markers(psid, pid): |
|
|
|
|
def fix_region(): |
|
|
|
|
#判断是否存在rcbox |
|
|
|
|
region_filename = os.path.join(config["workdir"], pid, "a.rcbox") |
|
|
|
|
region_filename = os.path.join(config["workdir"], pid, f"{pid}.rcbox") |
|
|
|
|
while True: |
|
|
|
|
if os.path.exists(region_filename): |
|
|
|
|
print("region_filename",region_filename) |
|
|
|
|
with open(region_filename, 'r') as f: |
|
|
|
|
lines = f.readlines() |
|
|
|
|
lines = [line.replace('"NONE" globalCoordinateSystemWkt="NONE" globalCoordinateSystemName="NONE"', '"+proj=geocent +ellps=WGS84 +no_defs" globalCoordinateSystemName="local:1 - Euclidean"') for line in lines] |
|
|
|
|
shutil.copyfile(os.path.join(config['workdir'], 'xmps','stand.rcbox'), os.path.join(config['workdir'], pid,f"{pid}.rcbox")) |
|
|
|
|
# shutil.copyfile(os.path.join(config['workdir'], 'xmps','stand.rcbox'), os.path.join(config['workdir'], pid,f"{pid}.rcbox")) |
|
|
|
|
break |
|
|
|
|
else: |
|
|
|
|
time.sleep(10) |
|
|
|
|
@ -91,7 +91,7 @@ def detect_markers(psid, pid):
@@ -91,7 +91,7 @@ def detect_markers(psid, pid):
|
|
|
|
|
|
|
|
|
|
#获取当前的工作目录 {config["r"]["setTextureFalse"]} -setReconstructionRegion "{rcboxfile}"\ |
|
|
|
|
dirCurr = os.getcwd() |
|
|
|
|
shutil.copyfile(os.path.join(config['workdir'], 'xmps','stand.rcbox'), os.path.join(config['workdir'], pid,f"{pid}.rcbox")) |
|
|
|
|
#shutil.copyfile(os.path.join(config['workdir'], 'xmps','stand.rcbox'), os.path.join(config['workdir'], pid,f"{pid}.rcbox")) |
|
|
|
|
rcboxfile = os.path.join(config["workdir"], pid, f"{pid}.rcbox") |
|
|
|
|
cmd = f'{config["rcbin"]} {config["r2"]["init"]} -setInstanceName {pid} \ |
|
|
|
|
-save "{os.path.join(config["workdir"], pid, f"{pid}.rcproj")}" \ |
|
|
|
|
@ -102,7 +102,7 @@ def detect_markers(psid, pid):
@@ -102,7 +102,7 @@ def detect_markers(psid, pid):
|
|
|
|
|
-defineDistance 36h11:001 36h11:002 1 -defineDistance 36h11:002 36h11:004 1 -defineDistance 36h11:004 36h11:003 1 -defineDistance 36h11:003 36h11:001 1 -align -align -update {config["r2"]["setRegion"]} \ |
|
|
|
|
-align -align -update \ |
|
|
|
|
-exportControlPointsMeasurements "{os.path.join(config["workdir"], pid, f"{pid}.controlPoints.csv")}" "{dirCurr}\exportControlPoints.config.xml"\ |
|
|
|
|
-exportReconstructionRegion "{os.path.join(config["workdir"], pid, f"a.rcbox")}" \ |
|
|
|
|
-exportReconstructionRegion "{os.path.join(config["workdir"], pid, f"{pid}.rcbox")}" \ |
|
|
|
|
-selectImage "{os.path.join(config["workdir"],pid,"photo1")}\*" -enableTexturingAndColoring false \ |
|
|
|
|
{textpicCmd} -save "{os.path.join(config["workdir"], pid, f"{pid}.rcproj")}" -quit' |
|
|
|
|
|
|
|
|
|
|