How to repair the corrupted image below using opencv, python, numpy and necessary libraries

Joined
May 22, 2022
Messages
1
Reaction score
0

import cv2

damaged_image = cv2.imread("Corrupted.png")
mask = cv2.imread("mask.png", 0)

output = cv2.inpaint(damaged_image, mask, 1, cv2.INPAINT_TELEA)
cv2.imshow('test', output)
cv2.waitKey(0)
cv2.destroyAllWindows()

I couldn't generate mask with python, i have drawn the mask by using Paint as you can see it is not perfect.


After this code i get this output:


the repaired image should look similar to this picture:

 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top