MCPcopy Create free account
hub / github.com/OpenDriveLab/DriveAdapter / resize_img

Function resize_img

camera_calibration/collect_data_for_calibration.py:208–215  ·  view source on GitHub ↗
(img)

Source from the content-addressed store, hash-verified

206# -- Useful Functions-----------------------------------------------------------
207# ==============================================================================
208def resize_img(img):
209 scale_percent = 50 # percent of original size
210 width = int(img.shape[1] * scale_percent / 100)
211 height = int(img.shape[0] * scale_percent / 100)
212 dim = (width, height)
213 # resize image
214 resized = cv2.resize(img, dim, interpolation = cv2.INTER_AREA)
215 return resized
216
217def euler_to_quaternion(yaw, pitch, roll):
218 qx = np.sin(roll/2) * np.cos(pitch/2) * np.cos(yaw/2) - np.cos(roll/2) * np.sin(pitch/2) * np.sin(yaw/2)

Callers 2

draw_rgb_imageFunction · 0.85
draw_depth_imageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected