Merging three numpy arrays as jpeg image in python -
i have split jpeg image r,g,b , converted them numpy arrays. changed pixel values of r,g,b. want merge these 3 1 jpeg , save it. original image 1024 * 500 image. if can give me idea, great help
im =image.open("new_image.jpg") r,g,b=im.split() r=np.array(r) g=np.array(g) b=np.array(b)
then changed values of pixels. want merge resulting r,g,b. in advance
based on document (page 4 in end), can merge:
r, g, b = im.split() im = image.merge("rgb", (b, g, r))
Comments
Post a Comment