title: OCR : Replace recognized text with its translation like google translate
body: <p>I am working on an OCR project. I using Firebase ML Kit for Optical character recognition. I have to replace the text with its translation in different language over the captured image. For that i need to erase the text from the original image before drawing translated text over it.</p>
  <p><a href="https://i.stack.imgur.com/dr3Bg.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dr3Bg.jpg" alt="Recognized" /></a><br />
  <sub>(source: <a href="https://codelabs.developers.google.com/codelabs/mlkit-android/img/29b56550af620fa1.png" rel="nofollow noreferrer">google.com</a>)</sub></p>
  <p>I have tried to extract the possible background color and text color from the detected co-ordinate of the text. Its almost success. But the problem is, the background will became static color.</p>
  <p><a href="https://superuser.com/questions/1359257/how-to-use-ffmpeg-removelogo-filter">https://superuser.com/questions/1359257/how-to-use-ffmpeg-removelogo-filter</a></p>
  <p>I am able to get the exact co-ordinate of the original text in the image. Found delogo filter in FFMPEG for videos. Since the adjacent pixels fill the desired area, would like to try it for Bitmap images in android. Any algorithm/implementation already there for removing logo/watermark/object from a bitmap.</p>
  <p>Expecting something like this</p>
  <p><img src="https://i.ytimg.com/vi/2E4t75uF6JI/maxresdefault.jpg" alt="Expected" /></p>