Skip to content
Snippets Groups Projects
Commit 9184edeb authored by las1g21's avatar las1g21
Browse files

Allows Access from other files

parent 7a1d691b
Branches GDP_4.2.1
No related tags found
1 merge request!9GDP 4.4.5
......@@ -24,7 +24,7 @@ def send_files(shifted_disparity_path, shifted_t_path):
except subprocess.CalledProcessError as e:
print(f"Error during SCP: {e}")
return False
return False, False
command = [
......@@ -37,7 +37,7 @@ def send_files(shifted_disparity_path, shifted_t_path):
except subprocess.CalledProcessError as e:
print(f"Error during SCP: {e}")
return False
return False, False
return True
def get_completed_scene(shifted_disparity_path, shifted_t_path):
......@@ -56,10 +56,10 @@ def get_completed_scene(shifted_disparity_path, shifted_t_path):
print("Connection is active.")
else:
print("Connection is not active.")
exit(1) # Exit the script if the connection is not active
return False, False
except Exception as e:
print(f"Failed to connect to {hostname}: {e}")
exit(1)
return False, False
stdin, stdout, stderr = client.exec_command(
"cd mona/MDBNet360_GDP/" +
......@@ -117,11 +117,22 @@ def get_completed_scene(shifted_disparity_path, shifted_t_path):
print("OUTPUT DOWNLOADED")
# Close the SSH connection
client.close()
return True
return True, local_file_path
else:
return False
return False, False
# out = get_completed_scene("C:\\Project\\AVVR-Pipeline-GDP4\\edgenet-360\\Data\\Courtyard\\shifted-disparity.png", "C:\\Project\\AVVR-Pipeline-GDP4\\edgenet-360\\Data\\Courtyard\\shifted_t.png")
# print(out)
\ No newline at end of file
# print(out)
if __name__ == "__main__":
if len(sys.argv) != 3:
print("Usage: python shifter.py <shifted_disparity_path> <shifted_t_path>")
sys.exit(1)
shifted_disparity_path = sys.argv[1]
shifted_t_path = sys.argv[2]
saved_path = get_completed_scene(shifted_disparity_path, shifted_t_path)
print(f"Shifted image saved as {saved_path}")
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment