Hi I am trying to compare a set of images where I want to produce a final image with maximum pixels from each individual image. Say I have 3 images (converted to 10x10 matrix) in which I know the pixel values of each block> Now I want to compare these values block by block and produce a final separate image with maximum block values from each image.
To do so I have changed the image dimensions(250x250) such that each block is a square of 25x25
I even tried comparing two images and taking the maximum pixels from both the images and displaying them
image = cv2.resize(im,(250,250))
hs,ws,c= image.shape
print(hs, ws,c)
hs = round(h/10)
ws = round(w/10)
resized = cv2.resize(image, (ws,hs), interpolation = cv2.INTER_AREA)
cv2.imshow("Resized image", resized)
cv2.waitKey(0)
cv2.destroyAllWindows()
print(list(resized))
#comparing two images
data = np.maximum.reduce([resized,resized1])
from matplotlib import pyplot as plt
plt.imshow(data, interpolation='nearest')
plt.show()
So these are two images and the tiled image is the result of the block #comparing two images. Now using these two images I want to produce a final image similar to the original photos not the tiled version but the final photo should have pixels from both original photos(maximum from each). I hope it clears the question



