facebook360_dep
Facebook360 Depth Estimation Pipeline
Functions | Variables
common Namespace Reference

Functions

def init (parent)
 
def setup_aws_config (parent)
 
def setup_farm (parent)
 
def get_tooltip (parent, app_name)
 
def initialize_paths (parent)
 
def setup_logs (parent)
 
def setup_flagfile_tab (parent)
 
def setup_file_explorer (parent)
 
def preview_file (parent)
 
def switch_ui_elements_for_processing (parent, gb, state)
 
def cancel_process (parent)
 
def is_cloud_running_process (parent)
 
def sync_with_s3 (parent, gb, subdirs)
 
def on_process_finished (parent, p_id)
 
def populate_dropdown (parent, gb, dd)
 
def populate_dropdowns (parent, gb, dd_first=None)
 
def refresh_data (parent)
 
def update_flagfile_edit (parent, flagfile_fn, switch_to_flag_tab=False)
 
def update_data_or_flags (parent, flagfile_fn, flagfile_from_data, switch_to_flag_tab=False)
 
def sync_data_and_flagfile (parent, flagfile_fn, set_label=True, switch_to_flag_tab=False)
 
def disable_tab_if_no_data (parent, btn_run)
 
def setup_project (parent, mkdirs=False)
 
def save_flag_file (parent, flagfile_fn)
 
def update_flagfile (parent, flagfile_fn)
 
def retrieve_missing_flagfiles (parent)
 
def add_default_flags (parent)
 
def get_calibrated_rig_json (parent)
 
def update_run_button_text (parent, btn)
 
def update_buttons (parent, gb, ignore=None)
 
def on_changed_dropdown (parent, gb, dd)
 
def on_changed_line_edit (parent, gb, le)
 
def setup_groupbox (gb, callbacks)
 
def setup_checkboxes (gb, callbacks)
 
def setup_dropdowns (parent, gb)
 
def setup_lineedits (parent, gb)
 
def setup_buttons (parent, gb, callbacks)
 
def on_changed_preview (parent)
 
def setup_preview (parent)
 
def setup_data (parent, callbacks=None)
 
def update_noise_detail (parent, noise, detail)
 
def update_fg_masks_thresholds (parent, blur, closing, thresh)
 
def log_missing_image (parent, path_color, cam_id, frame)
 
def update_thresholds_color_variance (parent, path_color, labels=None)
 
def update_thresholds_fg_mask (parent, paths_color)
 
def run_thresholds_after_wait (parent, type)
 
def run_thresholds (parent, type)
 
def output_has_images (output_dirs)
 
def run_process_check_existing_output (parent, gb, app_name, flagfile_fn, p_id)
 
def start_process (parent, cmd, gb, p_id, run_silently=False)
 
def run_process (parent, gb, app_name=None, flagfile_fn=None, p_id="run", overwrite=False)
 
def update_thresholds (parent, gb, type)
 
def on_state_changed_partial_360 (parent)
 
def on_state_changed_recompute (parent)
 
def on_state_changed_use_bg (parent, gb)
 
def on_state_changed_farm (parent, state)
 
def setup_thresholds (parent, types)
 
def setup_thresholds_color_variance (parent)
 
def setup_thresholds_fg_masks (parent)
 
def update_data_from_flags (parent, flags, dropdowns=None, values=None, checkboxes=None, labels=None, prefix=None)
 
def get_notation (parent, attr)
 
def on_changed_slider (parent, slider, value)
 
def initialize_farm_groupbox (parent)
 
def show_resources (parent)
 
def show_aws_resources (parent)
 
def get_aws_workers ()
 
def set_aws_workers (workers)
 
def popup_ec2_dashboard_url (parent)
 
def popup_logs_locations (parent)
 
def run_process_aws (parent, gb, p_id=None)
 
def on_download_meshes (parent, gb)
 
def on_terminate_cluster (parent, gb)
 
def get_workers (parent)
 
def call_force_refreshing (parent, fun, *args)
 

Variables

 dir_scripts = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
 
 dir_root = os.path.dirname(dir_scripts)
 
 script_dir = os.path.dirname(os.path.realpath(__file__))
 
 scripts_dir = os.path.abspath(os.path.join(script_dir, os.pardir))
 
 dep_dir = os.path.join(scripts_dir, os.pardir)
 
 dep_bin_dir = os.path.join(dep_dir, "build", "bin")
 
 dep_res_dir = os.path.join(dep_dir, "res")
 
 dep_flags_dir = os.path.join(dep_res_dir, "flags")
 
 exist_ok
 
 source_root = os.path.join(dep_dir, "source")
 
 depth_est_src = os.path.join(source_root, "depth_estimation")
 
 render_src = os.path.join(source_root, "render")
 
 render_scripts = os.path.join(scripts_dir, "render")
 
string type_color_var = "color_variance"
 
string type_fg_mask = "fg_mask"
 
dictionary threshold_sliders
 

Function Documentation

◆ add_default_flags()

def common.add_default_flags (   parent)
Retrieves the default flags to the local flagfile on the specified tab from
either the source or scripts binaries.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.

◆ call_force_refreshing()

def common.call_force_refreshing (   parent,
  fun,
args 
)

◆ cancel_process()

def common.cancel_process (   parent)
Stops a running process on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.

◆ disable_tab_if_no_data()

def common.disable_tab_if_no_data (   parent,
  btn_run 
)
Prevents navigation to the tab if the required data is not present on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    btn_run (QtWidgets.QPushButton): UI button for tab switch.

◆ get_aws_workers()

def common.get_aws_workers ( )
Get names of the instances in the AWS farm.

Returns:
    list[str]: Instances IDs of EC2 instances in the farm.

◆ get_calibrated_rig_json()

def common.get_calibrated_rig_json (   parent)
Finds calibrated rig in the project.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.

Returns:
    str: Name of the calibrated rig (assumes the rig contains "_calibrated.json").

◆ get_notation()

def common.get_notation (   parent,
  attr 
)
Gets standard format for attribute on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    attr (str): Name of the attribute.

Returns:
    str: Format string corresponding to the display notation.

◆ get_tooltip()

def common.get_tooltip (   parent,
  app_name 
)
Gets the help tooltip display of a binary.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    app_name (str): Name of the binary.

Returns:
    str: Help from the binary.

◆ get_workers()

def common.get_workers (   parent)
Finds workers in a LAN farm.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.

Returns:
    list[str]: IPs of workers in the local farm.

◆ init()

def common.init (   parent)
Sets up all the UI global internals (logs, data, and flags) and any
tab specific components.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.

◆ initialize_farm_groupbox()

def common.initialize_farm_groupbox (   parent)
Sets up the farm render box for the project path, i.e. AWS is displayed if
rendering on an S3 project path and LAN if on a SMB drive.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.

◆ initialize_paths()

def common.initialize_paths (   parent)
Initializes paths for scripts and flags depending on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.

◆ is_cloud_running_process()

def common.is_cloud_running_process (   parent)
Checks if a render process is being run on the cloud

◆ log_missing_image()

def common.log_missing_image (   parent,
  path_color,
  cam_id,
  frame 
)
Prints a warning if an image cannot be located.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    path_color (str): Path to the directory with color images.
    cam_id (str): Name of the camera.
    frame (str): Name of the frame (0-padded, six digits).

◆ on_changed_dropdown()

def common.on_changed_dropdown (   parent,
  gb,
  dd 
)
Callback event handler for changed dropdown on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    gb (QtWidgets.QGroupBox): Group box for the tab.
    dd (QtWidgets.QComboBox): Dropdown UI element.

◆ on_changed_line_edit()

def common.on_changed_line_edit (   parent,
  gb,
  le 
)
Callback event handler for changed line edit on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    gb (QtWidgets.QGroupBox): Group box for the tab.
    le (_): Ignore

◆ on_changed_preview()

def common.on_changed_preview (   parent)
Callback event handler for changed image previews on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.

◆ on_changed_slider()

def common.on_changed_slider (   parent,
  slider,
  value 
)
Callback event handler for changes to a slider UI element on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    slider (QtWidgets.QSlider): Slider UI element.
    value (int/float): Value of the slider element.

◆ on_download_meshes()

def common.on_download_meshes (   parent,
  gb 
)
Downloads meshes from S3. This is a no-op if not an S3 project.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    gb (QtWidgets.QGroupBox): Group box for the tab.

◆ on_process_finished()

def common.on_process_finished (   parent,
  p_id 
)
Callback event handler for a process completing on the specified tab.

Args:
    p_id (str): PID of completed process.

◆ on_state_changed_farm()

def common.on_state_changed_farm (   parent,
  state 
)
Callback event handler for changed "AWS" checkbox on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    state (str): Identifier of the callback state.

◆ on_state_changed_partial_360()

def common.on_state_changed_partial_360 (   parent)
Callback event handler for changed "partial coverage" checkbox on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.

◆ on_state_changed_recompute()

def common.on_state_changed_recompute (   parent)
Callback event handler for changed "recompute" checkbox on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.

◆ on_state_changed_use_bg()

def common.on_state_changed_use_bg (   parent,
  gb 
)
Callback event handler for changed "use background" checkbox on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    gb (QtWidgets.QGroupBox): Group box for the tab.

◆ on_terminate_cluster()

def common.on_terminate_cluster (   parent,
  gb 
)
Terminates a running AWS cluster. This is a no-op if no cluster is up.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    gb (QtWidgets.QGroupBox): Group box for the tab.

◆ output_has_images()

def common.output_has_images (   output_dirs)
Whether or not outputs already have results.

Args:
    output_dirs (list[str]): List of directories where outputs will be saved.

Returns:
    bool: Whether or not the output directories all have at least one valid file.

◆ populate_dropdown()

def common.populate_dropdown (   parent,
  gb,
  dd 
)
Populates a dropdown on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    gb (QtWidgets.QGroupBox): Group box for the tab.
    dd (QtWidgets.QComboBox): Dropdown UI element.

◆ populate_dropdowns()

def common.populate_dropdowns (   parent,
  gb,
  dd_first = None 
)
Populates the dropdowns on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    gb (QtWidgets.QGroupBox): Group box for the tab.
    dd_first (list[QtWidgets.QGroupBox], optional): Dropdowns to populate first.

◆ popup_ec2_dashboard_url()

def common.popup_ec2_dashboard_url (   parent)
Displays a link to the EC2 dashboard in a popup on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.

◆ popup_logs_locations()

def common.popup_logs_locations (   parent)
Displays the path to local logs in a popup on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.

◆ preview_file()

def common.preview_file (   parent)
Displays the file and its label on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.

◆ refresh_data()

def common.refresh_data (   parent)
Updates UI elements to be in sync with data on disk on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.

◆ retrieve_missing_flagfiles()

def common.retrieve_missing_flagfiles (   parent)
Copies the missing flagfiles to project for local modification on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.

◆ run_process()

def common.run_process (   parent,
  gb,
  app_name = None,
  flagfile_fn = None,
  p_id = "run",
  overwrite = False 
)
Runs an application on the terminal, using the associated flagfile.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    gb (QtWidgets.QGroupBox): Group box for the tab.
    app_name (str, optional): Name of the binary being executed.
    flagfile_fn (str, optional): Name of the flagfile to supply to the binary. this
        will default to the flagfile associated with the binary if unspecified.
    p_id (str, optional): PID name of the process being started.
    overwrite (bool, optional): Whether or not to overwrite the local flagfile on disk.

◆ run_process_aws()

def common.run_process_aws (   parent,
  gb,
  p_id = None 
)
Runs the process to create a cluster on AWS and perform the render job.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    gb (QtWidgets.QGroupBox): Group box for the tab.

◆ run_process_check_existing_output()

def common.run_process_check_existing_output (   parent,
  gb,
  app_name,
  flagfile_fn,
  p_id 
)
Run terminal process and raise on failure.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    gb (QtWidgets.QGroupBox): Group box for the tab.
    app_name (str): Name of the binary being executed.
    flagfile_fn (str): Name of the flagfile.
    p_id (str): PID name of the process to be run.

◆ run_thresholds()

def common.run_thresholds (   parent,
  type 
)
Runs thresholding based on values in the UI and update UI display on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    type (Union[ColorVariance, ForegroundMask]): Instance where thresholds are run.

◆ run_thresholds_after_wait()

def common.run_thresholds_after_wait (   parent,
  type 
)
Computes the threshold and displays after a delay on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    type (Union[ColorVariance, ForegroundMask]): Instance where thresholds
        can be run.

◆ save_flag_file()

def common.save_flag_file (   parent,
  flagfile_fn 
)
Saves flagfile from the UI to disk on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    flagfile_fn (str): Name of the flagfile.

◆ set_aws_workers()

def common.set_aws_workers (   workers)
Sets names of the instances in the AWS farm.

Args:
    workers (list[str]): Instance IDs of EC2 instances in the farm.

◆ setup_aws_config()

def common.setup_aws_config (   parent)
Sets up the configuration of the Kubernetes cluster.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.

◆ setup_buttons()

def common.setup_buttons (   parent,
  gb,
  callbacks 
)
Sets up callbacks for any buttons on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    gb (QtWidgets.QGroupBox): Group box for the tab.
    callbacks (dict[QtWidgets.QPushButton, func : QEvent -> _]): Callbacks for the UI elements.

◆ setup_checkboxes()

def common.setup_checkboxes (   gb,
  callbacks 
)
Sets up callbacks for any checkboxes on the specified tab.

Args:
    gb (QtWidgets.QGroupBox): Group box for the tab.
    callbacks (dict[QtWidgets.QGroupBox, func : QEvent -> _]): Callbacks for the UI elements.

◆ setup_data()

def common.setup_data (   parent,
  callbacks = None 
)
Sets up callbacks and initial UI element statuses on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    callbacks (dict[QtWidgets.QGroupBox, func : QEvent -> _]): Callbacks for the UI elements.

◆ setup_dropdowns()

def common.setup_dropdowns (   parent,
  gb 
)
Sets up callbacks for any dropdowns on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    gb (QtWidgets.QComboBox): Group box for the tab.

◆ setup_farm()

def common.setup_farm (   parent)
Sets up the UI to interact with a LAN cluster.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.

◆ setup_file_explorer()

def common.setup_file_explorer (   parent)
Creates the file explorer rooted  on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.

◆ setup_flagfile_tab()

def common.setup_flagfile_tab (   parent)
Sets up the flags according to the corresponding flagfile on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.

◆ setup_groupbox()

def common.setup_groupbox (   gb,
  callbacks 
)
Sets up callbacks for any groupboxes on the specified tab.

Args:
    gb (QtWidgets.QGroupBox): Group box for the tab.
    callbacks (dict[QtWidgets.QGroupBox, func : QEvent -> _]): Callbacks for the UI elements.

◆ setup_lineedits()

def common.setup_lineedits (   parent,
  gb 
)
Sets up callbacks for any line edits on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    gb (QtWidgets.QGroupBox): Group box for the tab.

◆ setup_logs()

def common.setup_logs (   parent)
Sets up logging system for dialog on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.

Returns:
    LogReader: Reader configured for the current tab.

◆ setup_preview()

def common.setup_preview (   parent)
Creates preview window in the UI and connects a callback on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.

◆ setup_project()

def common.setup_project (   parent,
  mkdirs = False 
)
Retrieves any missing flagfiles and sets the default flags on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    mkdirs (bool, optional): Whether or not to make the defined directories.

◆ setup_thresholds()

def common.setup_thresholds (   parent,
  types 
)
Sets necessary thresholds apps on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    type (Union[ColorVariance, ForegroundMask]): Instance where thresholds
        can be run.

◆ setup_thresholds_color_variance()

def common.setup_thresholds_color_variance (   parent)
Sets color variance thresholds apps on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.

◆ setup_thresholds_fg_masks()

def common.setup_thresholds_fg_masks (   parent)
Sets up the default thresholds on foreground masks on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.

◆ show_aws_resources()

def common.show_aws_resources (   parent)
Displays resources used across the AWS cluster.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.

Returns:
    src: Resources (memory and CPU) being used in the farm.

◆ show_resources()

def common.show_resources (   parent)
Displays resources used in the container.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.

Returns:
    str: Resources (memory and CPU) being used.

◆ start_process()

def common.start_process (   parent,
  cmd,
  gb,
  p_id,
  run_silently = False 
)
Runs a terminal process and disables UI element interaction.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    cmd (str): Command to run in the terminal.
    gb (QtWidgets.QGroupBox): Group box for the tab.
    p_id (str): PID name of the process being started.

◆ switch_ui_elements_for_processing()

def common.switch_ui_elements_for_processing (   parent,
  gb,
  state 
)
Switches element interaction when processing on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    gb (QtWidgets.QGroupBox): Group box for the tab.
    state (str): Identifier of the callback state.

◆ sync_data_and_flagfile()

def common.sync_data_and_flagfile (   parent,
  flagfile_fn,
  set_label = True,
  switch_to_flag_tab = False 
)
Synchronizes displayed UI elements and contents of the flagfile.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    flagfile_fn (str): Name of the flagfile.
    set_label (bool, optional): Whether or not to update the flagfile label in the UI.
    switch_to_flag_tab (bool, optional): Whether or not to switch tabs after updating.

◆ sync_with_s3()

def common.sync_with_s3 (   parent,
  gb,
  subdirs 
)
Synchronizes data from the local directory to S3.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    gb (QtWidgets.QGroupBox): Group box for the tab.
    subdirs (list[str]): Local path to be synced.

◆ update_buttons()

def common.update_buttons (   parent,
  gb,
  ignore = None 
)
Enables buttons and dropdowns according to whether or not data is present on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    gb (QtWidgets.QGroupBox): Group box for the tab.
    ignore (list[QtWidgets.QGroupBox], optional): Buttons to not update.

Returns:
    tuple[bool, bool, bool]: Whether or not the UI is currently running a process and if it
        has all its dropdowns.

◆ update_data_from_flags()

def common.update_data_from_flags (   parent,
  flags,
  dropdowns = None,
  values = None,
  checkboxes = None,
  labels = None,
  prefix = None 
)
Updates UI elements from the flags on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    flags (dict[str, _]): Flags and their corresponding values.
    dropdowns (list[QtWidgets.QComboBox], optional): Dropdowns in the tab.
    values (dict[QtWidgets.QLineEdit, _], optional): Map from UI elements to values.
    checkboxes (list[QtWidgets.QCheckBox], optional): Checkboxes in the tab.
    labels (list[QtWidgets.QLabel], optional): Labels in the tab.
    prefix (str, optional): Prefix to append to values in the population of tab values.

◆ update_data_or_flags()

def common.update_data_or_flags (   parent,
  flagfile_fn,
  flagfile_from_data,
  switch_to_flag_tab = False 
)
Updates the flagfile from the UI elements or vice versa on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    flagfile_fn (str): Name of the flagfile.
    flagfile_from_data (bool): Whether to load the flagfile from the data (True) or
        vice versa (False).
    switch_to_flag_tab (bool, optional): Whether or not to switch tabs after updating.

◆ update_fg_masks_thresholds()

def common.update_fg_masks_thresholds (   parent,
  blur,
  closing,
  thresh 
)
Updates thresholds and display for the foreground masking on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    blur (int, optional): Gaussian blur radius.
    closing (int, optional): Closure (for sealing holes).
    thresh (int, optional): Threshold applied to segment foreground and background

◆ update_flagfile()

def common.update_flagfile (   parent,
  flagfile_fn 
)
Updates the edit box for the flagfile on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    flagfile_fn (str): Name of the flagfile.

◆ update_flagfile_edit()

def common.update_flagfile_edit (   parent,
  flagfile_fn,
  switch_to_flag_tab = False 
)
Updates the edit box for the flagfile on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    flagfile_fn (str): Name of the flagfile.
    switch_to_flag_tab (bool, optional): Whether or not to switch tabs after updating.

◆ update_noise_detail()

def common.update_noise_detail (   parent,
  noise,
  detail 
)
Updates noise/detail thresholds interaction on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    noise (float): Noise threshold.
    detail (float): Detail threshold.

◆ update_run_button_text()

def common.update_run_button_text (   parent,
  btn 
)
Updates the text of the Run button depending on the existance of a process
running on the cloud

◆ update_thresholds()

def common.update_thresholds (   parent,
  gb,
  type 
)
Updates the displayed thresholds for either color variance or foreground masks.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    gb (QtWidgets.QGroupBox): Group box for the tab.
    type (Union[ColorVariance, ForegroundMask]): Instance where thresholds
        can be run.

◆ update_thresholds_color_variance()

def common.update_thresholds_color_variance (   parent,
  path_color,
  labels = None 
)
Updates the displayed thresholds for color variance on the specified tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    path_color (str): Path to the directory with color images.
    labels (list[str], optional): Labels used to filter UI elements to update.

◆ update_thresholds_fg_mask()

def common.update_thresholds_fg_mask (   parent,
  paths_color 
)
Updates thresholds and display for the foreground masking using values from UI
on the specified tab."

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.
    paths_color (list[str]): Paths to the directory with color images.

Variable Documentation

◆ dep_bin_dir

common.dep_bin_dir = os.path.join(dep_dir, "build", "bin")

◆ dep_dir

common.dep_dir = os.path.join(scripts_dir, os.pardir)

◆ dep_flags_dir

common.dep_flags_dir = os.path.join(dep_res_dir, "flags")

◆ dep_res_dir

common.dep_res_dir = os.path.join(dep_dir, "res")

◆ depth_est_src

common.depth_est_src = os.path.join(source_root, "depth_estimation")

◆ dir_root

common.dir_root = os.path.dirname(dir_scripts)

◆ dir_scripts

common.dir_scripts = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

◆ exist_ok

common.exist_ok

◆ render_scripts

common.render_scripts = os.path.join(scripts_dir, "render")

◆ render_src

common.render_src = os.path.join(source_root, "render")

◆ script_dir

common.script_dir = os.path.dirname(os.path.realpath(__file__))

◆ scripts_dir

common.scripts_dir = os.path.abspath(os.path.join(script_dir, os.pardir))

◆ source_root

common.source_root = os.path.join(dep_dir, "source")

◆ threshold_sliders

dictionary common.threshold_sliders
Initial value:
1 = {
2  # attr: type, printed name, slider index, max value, default value
3  "noise": [type_color_var, "Noise variance", 1, 1.5e-3, 4e-5],
4  "detail": [type_color_var, "Detail variance", 2, 2e-2, 1e-3],
5  "blur": [type_fg_mask, "Blur radius", 1, 20, 2],
6  "closing": [type_fg_mask, "Closing size", 2, 20, 4],
7  "thresh": [type_fg_mask, "Threshold", 3, 1, 3e-2],
8 }

◆ type_color_var

string common.type_color_var = "color_variance"

◆ type_fg_mask

string common.type_fg_mask = "fg_mask"