Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OK. I've found my mistake. I had the wrong copy of my image.

The following prevents blurring, in case if someone out there still needs it:

# rotate the shuttle as the camera does
# first though, get a copy
toBeRotatedShuttle = shuttleIcon.copy()
rows, cols, w = toBeRotatedShuttle.shape
angle = get_camera_rotation(smoothenedMatrix)
angleInDegrees = round(math.degrees(math.asin(angle)), 2)  # convert radian to degrees
rotationMatrix = cv2.getRotationMatrix2D((cols / 2, rows / 2), angleInDegrees, 1)
toBeRotatedShuttle = cv2.warpAffine(toBeRotatedShuttle, rotationMatrix, (cols, rows), cv2.INTER_LANCZOS4)

# Overlay transparent images at desired postion(x,y) and Scale.