(img)
| 206 | # -- Useful Functions----------------------------------------------------------- |
| 207 | # ============================================================================== |
| 208 | def 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 | |
| 217 | def 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) |
no outgoing calls
no test coverage detected