I appreciate it if you can provide me with one-line code.
I used np.flip but I want a different approach to make it generalized.
This was my code: np.flip(image, 1)
I also used np.fliplr(image)
.
Note: The image to be flipped has three channels.
flipped_image = image[:, ::-1, :]