Load a folder containing rgb_full.mp4/input_video.mp4 and quadmask_0.mp4
(self)
| 184 | return grid_rows, grid_cols |
| 185 | |
| 186 | def load_folder(self): |
| 187 | """Load a folder containing rgb_full.mp4/input_video.mp4 and quadmask_0.mp4""" |
| 188 | folder = filedialog.askdirectory(title="Select Folder") |
| 189 | if not folder: |
| 190 | return |
| 191 | |
| 192 | folder_path = Path(folder) |
| 193 | |
| 194 | # Find RGB video |
| 195 | rgb_path = None |
| 196 | for name in ["rgb_full.mp4", "input_video.mp4"]: |
| 197 | candidate = folder_path / name |
| 198 | if candidate.exists(): |
| 199 | rgb_path = candidate |
| 200 | break |
| 201 | |
| 202 | mask_path = folder_path / "quadmask_0.mp4" |
| 203 | |
| 204 | if not rgb_path or not mask_path.exists(): |
| 205 | messagebox.showerror("Error", "Folder must contain quadmask_0.mp4 and rgb_full.mp4 or input_video.mp4") |
| 206 | return |
| 207 | |
| 208 | self.folder_path = folder_path |
| 209 | self.rgb_path = rgb_path |
| 210 | self.mask_path = mask_path |
| 211 | |
| 212 | # Load videos |
| 213 | self.load_videos() |
| 214 | |
| 215 | def load_videos(self): |
| 216 | """Load RGB and mask videos into memory""" |
nothing calls this directly
no test coverage detected