how do i remove the text from manga page i already crop it using ROI and i want to replace it with new text using cv2.putText()
this is the sample of the image
I used a trick to make cv2.inpaint
more accurate to remove the text, but I just realized that these masks are not connected to each other to find the accurate center x, y, w, h of the single ROI of this image.
should i calculate the middle x,y coordinate using this function from original size or any advice to make it more accurate to put the new text in the middle of the w and h then wrap it ?
def midpoint(x1,y1,x2,y2):
x_mid = int((x1+x2)/2)
y_mid = int((y1+y2)/2)
return (x_mid,y_mid)