def create_local_folders(self, videoFileName): local_root_dir = "/tmp/crabs" if not os.path.exists(local_root_dir): os.makedirs(local_root_dir) folderStruct = FolderStructure(local_root_dir, videoFileName) folderStruct.createDirectoriesIfDontExist( folderStruct.getDriftsFilepath()) return folderStruct
#rootDir = "C:\workspaces\AnjutkaVideo\Antarctic_2020_AMK79\st6647" #videoFileName = "V4" # rootDir = "C:/workspaces/AnjutkaVideo/2020-Kara/2020.09.13_6916" # videoFileName = "R_20200913_203053_20200913_203451" # videoFileName = "R_20200913_203451_20200913_203849" rootDir = "C:/workspaces/AnjutkaVideo/2020-Kara/2020.09.16_6922" videoFileName = "R_20200916_194953_20200916_195355" # rootDir = "C:/workspaces/AnjutkaVideo/2020-Kara/2020.09.01_6878" # videoFileName = "V20200901_214516_001" folderStruct = FolderStructure(rootDir, videoFileName) folderStruct.createDirectoriesIfDontExist(folderStruct.getDriftsFilepath()) StreamToLogger(folderStruct.getLogFilepath()) print ("Starting DetectDrift") #Create _config.txt file if it does not exist configs = Configurations(folderStruct) controller = DetectDriftsController(folderStruct) controller.run() print ("Done DetectDrift")
def writeToFile(self, filepath): FolderStructure.createDirectoriesIfDontExist(filepath) cv2.imwrite(filepath, self.asNumpyArray()) # save frame as JPEG file