

The area highlighted in the red rectangle is the area we wish to extract and increase the resolution of (i.e., resize to a larger width and height without degrading the quality of the image patch). Applying bicubic interpolation to this region yields poor results. We wish to increase the resolution of the area in the red rectangle. … however, if you increase the spatial dimensions too much, then the output image appears pixelated, has artifacts, and in general, just looks “aesthetically unpleasing” to the human eye.įor example, let’s consider the following figure:įigure 1: On the top we have our original input image. These functions “work” in the sense that an input image is presented, the image is resized, and then the resized image is returned to the calling function … all use classic interpolation techniques and algorithms (ex., nearest neighbor interpolation, linear interpolation, bicubic interpolation) to increase the image resolution. That’s because Photoshop, GIMP, Image Magick, OpenCV (via the cv2.resize function), etc. More simply, take an input image and increase the width and height of the image with minimal (and ideally zero) degradation in quality.Īnyone who has ever opened a small image in Photoshop or GIMP and then tried to resize it knows that the output image ends up looking pixelated. Super resolution encompases a set of algorithms and techniques used to enhance, increase, and upsample the resolution of an input image. We’ll wrap up this tutorial with a discussion of our results.
#Make low res image cleaner lines how to#
How specialized deep learning architectures can help us achieve super resolution in real-timeįrom there, I’ll show you how to implement OpenCV super resolution with both:.

#Make low res image cleaner lines code#
Looking for the source code to this post? Jump Right To The Downloads Section OpenCV Super Resolution with Deep Learning To learn how to use OpenCV for deep learning-based super resolution, just keep reading. The function requires a bit of explanation to use, so I decided to author a tutorial on it that way everyone can learn how to use OpenCV’s super resolution functionality.īy the end of this tutorial, you’ll be able to perform super resolution with OpenCV in both images and real-time video streams! However, OpenCV’s super resolution functionality is actually “hidden” in a submodule named in dnn_superres in an obscure function called DnnSuperResImpl_create. Pre-trained (meaning you don’t have to train them yourself on a dataset).You’re in luck, Hisham - there are super resolution deep neural networks that are both: If you have any suggestions, that would be a big help.” It was super helpful, thank you.Īre there any pre-trained super resolution models compatible with OpenCV’s dnn module? “Hi Adrian, I read your Deep Learning for Computer Vision with Python book and went through your super resolution implementation with Keras and TensorFlow.
