I have a usecase where I want to convert an image from [600, 400, 3] to [600, 400].
Currently, I am saving the image into local directory and while loading I do “img = cv2.imread(img_loc, 0)”.
Although this converts the image channel however, I wonder if there is a better way of doing this. I want to avoid writing to disc if possible.