'How to remove the ghosting effect on the final image?
I was given three images which are R, G, and B images. I used split to put the RGB into the channel and merge it into one final image. However, I am getting a ghosting effect.
Here is how I did this.
IMAGE_PATH = 'was on local'
def readRGBImages(name: str):
R = cv2.imread('{}/{}.jpg_r.jpg'.format(IMAGE_PATH, name))
G = cv2.imread('{}/{}.jpg_g.jpg'.format(IMAGE_PATH, name))
B = cv2.imread('{}/{}.jpg_b.jpg'.format(IMAGE_PATH, name))
return R, G, B
def mergeRGB(R, G, B):
_,_,r =cv2.split(R)
# plt.imshow(R)
_,g,_ = cv2.split(G)
# plt.imshow(G)
b,_,_ = cv2.split(B)
# plt.imshow(B)
orgional = cv2.merge([r,g,b])
plt.imshow(orgional)
orgional = cv2.cvtColor(orgional, cv2.COLOR_BGR2RGB)
return orgional
R, G, B = readRGBImages('3')
cv2.imwrite('3.jpg',mergeRGB(R,G,B))
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

