Alright so I'm a complete n00b at image processing so forgive me if my question sounds vague. I'll try to supplement it with what I have learnt until now and also a couple of images.

See the caption in the image below?

enter image description here

What I'm essentially trying to do, it to remove it and restore the original image in (Python using OpenCV).

Now I have a couple of approaches in mind. First one I read about is a technique called Inpainting. Now I saw a tutorial on inpaiting here but this required me to create a separate mask where the non-zero pixels denote the stuff I want gone.

Now what I noticed is that the caption is not fully opaque. So i was wondering if there is any possible way to restore the original image by first removing the darkened part of the strip. (essentially something very the original image with only the whitened text on it) and then create a mask of the text and then use inpaiting.

Now I have a couple of questions.

  1. What technique do I use to remove the darkened part (let the text be now, we can remove it in the second step using inpainting)
  2. Does this algorithm even make sense. Is there a better approach I should be looking at?

NOTE: In no way am I looking for any sort of code or specific implementation. I'm just looking for what techniques and procedures I can study up on so as to get the job done. The rest is on me

  • $\begingroup$ I think the Signal Processing SE (dsp.stackexchange.com) would be more suited for this type of question. $\endgroup$ Aug 20, 2016 at 14:54
  • 2
    $\begingroup$ I like your idea of reversing the darkened band so the inpainting only needs to be applied to the text and small face. The darkening is likely to be a fairly simple function such as halving the colour values of each pixel. You could experiment with different values to see if there's an obvious fit. $\endgroup$ Aug 20, 2016 at 17:17
  • $\begingroup$ Bear in mind that the darkening may have been applied to linear or gamma corrected pixel values, so that's another thing to experiment with. $\endgroup$ Aug 20, 2016 at 17:18
  • 1
    $\begingroup$ If you start work on your own approach and run into a problem, you can ask another question here, explaining what you have tried so far. If you have any doubts over what you can ask about, you can contact me in Computer Graphics Chat using @trichoplax $\endgroup$ Aug 20, 2016 at 17:32
  • 1
    $\begingroup$ @trichoplax it is a simple function. If it were for the horrible compression artifacts in he image Id have deleted the line by now, here is the test again i wouldn't bother to do this with these kinds of jepg qualities. The color cast could be easily deleted if the jpeg artifacts wouldn't have ruined the area. $\endgroup$
    – joojaa
    Aug 22, 2016 at 18:29


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.