As a rough sketch of what our new infrastructure would look like:
class Frame:
def __init__(self, raw: List):
# Initialize frame information based on the CSV line
class FrameSequence:
def __init__(self, filename: str):
self.frames = [] # List of initialized Frame classes
self.filename = filename # Name of the CSV file
self.refresh()
def refresh(self) -> None:
# Load the CSV and iterate self.process() over each line
def process(self, raw_frame: List) -> None:
# Process raw frame (list from reading a line in the CSV) and add it to the sequence
As a rough sketch of what our new infrastructure would look like: