Autonomobile / AutoPylot

A project to race 1:10 RC cars autonomously around a track while going as fast as possible
MIT License
10 stars 0 forks source link

Load and Save data #9

Closed Maximellerbach closed 2 years ago

Maximellerbach commented 2 years ago

Load and save images using opencv (cv2)

AlexandreGirold commented 2 years ago

what do you mean by combining both ?

Maximellerbach commented 2 years ago

@DieuCrevette load an image associated to a json file. A function that takes as input the path of the json file, deduce the path of the image (remove the .json and add the .png) and then load the image. Then return the image and json. pseudo code example:

def load_both (json_path):
    json_data = load_json(json_path)
    image_path = get_image_path(json_data)
    image = load_image(image_path)
    return image, json_data