RGB image display in Matplotlib: plt.imshow returns a blue image
you can directly use this line to convert the BGR image to RGB:
image = cv2.imread("path/to/file/image.jpg")[:,:,::-1]
You are facing this issue since you are reading the image with opencv and opencv reads and displays an image as BGR format instead of RGB color format. Whereas matplotlib uses RGB color format to display image. Try using:
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
pixels = np.array(image)
plt.imshow(pixels)
plt.show()