MCPcopy Create free account
hub / github.com/VisionXLab/OF-Diff / shave

Function shave

ldm/modules/image_degradation/utils_image.py:510–515  ·  view source on GitHub ↗
(img_in, border=0)

Source from the content-addressed store, hash-verified

508
509
510def shave(img_in, border=0):
511 # img_in: Numpy, HWC or HW
512 img = np.copy(img_in)
513 h, w = img.shape[:2]
514 img = img[border:h-border, border:w-border]
515 return img
516
517
518'''

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected