The network download computer wallpaper images into a high quality image can do -simple

Download images generally present a smaller size, typically provided directly to the wallpaper effect is poor, the following code can optimize image quality, converting it into suitable as a wallpaper image :( I test applies only some of the downloaded images, to be universal inquiry)

#include <opencv2/opencv.hpp>

using namespace std;
using namespace cv;

int main()
{
    Mat img;
    img = imread("C:/Users/lenovo/Pictures/元气少女7.jpg");
    resize(img, img, img.size() * 2, 0, 0, INTER_CUBIC);
    Mat dst;
    bilateralFilter(img, dst, -1, 30, 9);
        imwrite("res.jpg", dst);
        return 0;
}

before:

after:

Or more, happy ~

Guess you like

Origin www.cnblogs.com/annaZYY/p/11839030.html