EyeTrackVR/RANSACApp/config.py
Kyle Machulis 71abcd4a06 Start building new RANSAC App with multiple modules and unified GUI
Divide out utilities from main algorithm, set utilities on their own
threads. Reference binaries in original directory so we don't have to
duplicate them in the repo.
2022-06-05 20:19:39 -07:00

22 lines
584 B
Python

import json
import os.path
class RansacConfig:
def __init__(self):
self.threshhold = 0
self.rotation_angle = 0
self.roi_window_x = 0
self.roi_window_y = 0
self.roi_window_w = 640
self.roi_window_h = 480
def load(self):
if not os.path.exists("ransac_settings.json"):
print("No settings file, using base settings")
return
with open("ransac_settings.json", 'r') as settings_file:
json.load(settings_file)
def save(self):
with open("ransac_settings.json", 'w+') as settings_file:
json.dump(self.__dict__, settings_file)