Upscaling a screenshot with subpixel antialiased text produces unpleasant color fringes, e.g. why does black text have orange and blue pixels This is especially annoying when trying to show an application on a projector, when you have to zoom in with a tool like the Windows Magnifier to show details to the audience.

There are some solutions available to exploit the subpixel geometry of a display when downscaling an image, e.g. https://computergraphics.stackexchange.com/a/1431/12022. Are there any solutions for the opposite, i.e. taking an image with subpixel rendering and producing an upscaled image without color artifacts? I imagine this task is much more difficult in the presence of both subpixel (text) and non-subpixel (the rest of the screenshot) content in the same image, though.

  • 1
    $\begingroup$ You would have to know the pixels for the text. $\endgroup$ – lightxbulb Mar 10 at 18:44
  • $\begingroup$ I hoped there would be some heuristics (based on stuff like edge detection on different color channels) to find pixels likely corresponding to text, although I couldn't find any. $\endgroup$ – Kristóf Marussy Mar 10 at 23:23
  • $\begingroup$ Possibly a neural network can help. Any simpler heuristic will probably also include other elements than the text. $\endgroup$ – lightxbulb Mar 11 at 4:47
  • $\begingroup$ If you can (a) assume a certain RGB layout for the display (and I imagine you could quickly determine this based on the first vertical edge) and (b) assume fixed background and foreground colours (hopefully white and black) then you should be able to replace your source image with a 'monochrome' image which is 3x the resolution in X. $\endgroup$ – Simon F Mar 13 at 8:48
  • $\begingroup$ @SimonF In my case, I would have actual screen captures (text with various colors mixed with GUI elements and images). I know the subpixel layout (queried from the display). I guess a GAN could be trained to do screenshot superresolution, but I am more interested in real-time (think Window Magnifier) solutions. I was hoping that, if my eyes can easily see sub-pixel text as a single color, there is a simple signal processing operation that could do the same... $\endgroup$ – Kristóf Marussy Mar 14 at 12:10

Your Answer

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

Browse other questions tagged or ask your own question.