Applying overlays to image with varying transparency
问题 I have got a RGB image (224x224x3) and an overlay (224x224). Now I want to apply my overlay as red pixels on my RGB image, which I make therefore to grayscale. The overlay range from 0 to 255. Higher values should make a stronger red. I tried to use Stefan's tutorial, but I could not adapt it: tutorial. Here is my code: # RGB input, shape (224x224x3) img = self.inputImage # make to grayscale img = np.average(img, axis=2) rows, cols = img.shape[0], img.shape[1] color_mask = np.zeros((rows,