I want to remove "the worst of times" from this image. How do I do that? I don't have a preference to how it's done.

  • $\begingroup$ Like this? i.stack.imgur.com/ZzSwm.png $\endgroup$
    – user484
    Oct 23 '16 at 6:09
  • $\begingroup$ Welcome to Mathematica.SE! 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour and check the faqs! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$
    – user9660
    Oct 23 '16 at 7:49
  • 1
    $\begingroup$ Do you want it done specifically with text recognition? $\endgroup$
    – Feyre
    Oct 23 '16 at 8:53
  • 2
    $\begingroup$ Please add more specifics. $\endgroup$
    – Yves Klett
    Oct 23 '16 at 9:50
  • 1
    $\begingroup$ closely related How to automatically remove text from images? $\endgroup$
    – Sumit
    Oct 23 '16 at 13:36

Maybe something like this:

img = Import["https://i.stack.imgur.com/0Jl54.png"]

text = TextRecognize @ img

del = {"the worst", "of times"};

Rasterize[#, RasterSize -> 1000, ImageSize -> ImageDimensions @ img]& @
   Style[#, FontFamily -> "Times"]& @
  text, {del[[1]] -> StringPadRight["", StringLength @ del[[1]]], 
   del[[2]] -> StringPadRight["", StringLength @ del[[2]]]}]

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.