| 286 | |
| 287 | |
| 288 | def test_crop(): |
| 289 | img_path = "/home/henry/Documents/projects/pylidarmot/src/vision_semantic_segmentation/outputs/distance_new/version_3/global_map_input_list_0.png" |
| 290 | img_path = "/home/henry/Documents/projects/pylidarmot/src/vision_semantic_segmentation/outputs/points_raw/version_1/global_map.png" |
| 291 | img = cv2.imread(img_path) |
| 292 | clipped_img = np.flip(img[805:885, 5350:5700], axis=1) |
| 293 | clipped_img = np.flip(clipped_img, axis=0) |
| 294 | plt.figure() |
| 295 | plt.imshow(clipped_img) |
| 296 | plt.show() |
| 297 | cv2.imwrite("/home/henry/Pictures/global_map_real_time_scan_clipped.png", clipped_img) |
| 298 | |
| 299 | # main |
| 300 | def main(): |