MCPcopy
hub / github.com/xingyizhou/CenterNet / crop

Function crop

src/lib/utils/image.py:84–92  ·  view source on GitHub ↗
(img, center, scale, output_size, rot=0)

Source from the content-addressed store, hash-verified

82
83
84def crop(img, center, scale, output_size, rot=0):
85 trans = get_affine_transform(center, scale, rot, output_size)
86
87 dst_img = cv2.warpAffine(img,
88 trans,
89 (int(output_size[0]), int(output_size[1])),
90 flags=cv2.INTER_LINEAR)
91
92 return dst_img
93
94
95def gaussian_radius(det_size, min_overlap=0.7):

Callers

nothing calls this directly

Calls 1

get_affine_transformFunction · 0.85

Tested by

no test coverage detected