MCPcopy Create free account
hub / github.com/AutonomousVehicleLaboratory/SemVecNet / test_crop

Function test_crop

semantic_mapping/src/utils/utils.py:288–297  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

286
287
288def 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
300def main():

Callers 1

mainFunction · 0.85

Calls 2

flipMethod · 0.45
showMethod · 0.45

Tested by

no test coverage detected