Adjust image rotation to camera rotation
Hi,
I have written a program which blends a space shuttle icon into an image which is projected. My program, additionally, uses feature matching, homography and perspective transform so that the icon can be moved as the camera moves. In other words, move the camera over the projected image to move the icon around.
I am done with everything describe above. One thing I want to accomplish is to rotate the icon image with the camera. That is, do not always draw the icon as it is, rotate it to left and right when the camera rotates so.
Here is my code which blends the icon into the image:
# blend the shuttleIcon into the image
processedImage = cv2.cvtColor(processedImage, cv2.COLOR_BGR2BGRA)
w, h, c = shuttleIcon.shape
for i in range(0, w):
for j in range(0, h):
if shuttleIcon[i, j][3] != 0:
processedImage[trackedCenterPoint[1] + i, trackedCenterPoint[0] + j] = shuttleIcon[i, j]
processedImage = cv2.cvtColor(processedImage, cv2.COLOR_BGRA2BGR)
How can I incorporate the camera rotation into this? Any thoughts?
NOTE: I do not have the calibration matrix.