Search code examples
opencvcomputer-visionocrphotolcd

Avoiding strips after capturing photo from LCD display


I have faced with such problem, when I capture photo from LCD display there are annoying rainbow strips.

Is there any way to clear image from them doing some computer vision stuff? Which are the keywords should I google for? Or maybe some useful links/papers related for.

My goal is to OCRing after it. In case of low threshold WolfJolion binarization finds a lot of connected components which cause slow and bad recognition. Using higher threshold some characters are vanished from image.

Source photo: enter image description here

First binarization: enter image description here

Second binarization: enter image description here

P.S. Photos are taken from MacBook Pro Retina Display with iPhone 6 camera.


Solution

  • What you see is called Moire effect. It is caused by subsampling the screen pixels with your camera pixels. Simply slightly change angle and or distance to avoid these. Then you don't need any image processing. Beside that these stripes should not bother any decent OCR.

    If you insist on image processing then a global threshold should do the trick.