My code uses input from a rotary encoder connected to a Rapsberry Pi send over TCP:
num_rows, num_cols = img.shape[:2]
data = s.recv(BUFFER_SIZE)
speed = data.decode("utf-8")
print("Speed = ", speed)
translation_matrix = np.float32([ [1,0,np.float32(speed)], [0,1,0] ])
img = cv2.warpAffine(img, translation_matrix, (num_cols, num_rows))
I use this input to make a translation matrix so that i can shift my image according the input from the encoder.
My initial Image looks like this:
After a few warpAffines it looks like this:
Is there a way to reduce the blurring/warping of the image while still being able to move it in a nice way