I am taking an RGB image as an input in Python which it obviously converts into 2D numpy array. I would like to replace only a window/part of an image by making it totally white (or replacing it with a 2D numpy array having values of only 255).
Here's what I tried:
img[i:i+r,j:j+c] = (np.ones(shape=(r,c))) * 255
r,c is my window size (128*128) and my input image is of RGB channel. It throws an error:
ValueError: could not broadcast input array from shape (128,128) into shape (128,3)
Note: I would like my final output image to be in RGB channel with specific parts replaced by white windows. I am using Python 3.5.