Sharpen the image

Hi guys,

I’m new to openCV. I have a picture that taken from long distance and I want to make it clear, so I use bilateralFilter and usm sharp to do operation, but the result is not ideal.
Thanks for help!

The code is like this:

src = imread( samples::findFile( filename ), IMREAD_COLOR );
//![bilateralfilter]
for ( int i = 1; i < 31; i = i + 2 )
        bilateralFilter ( src, dst, i, i*2, i/2 );

Mat blur_usm;
    //display_caption("gausss ");

    // usm sharp
    cv::GaussianBlur(src, blur_usm, Size(0, 0), 25);
    cv::addWeighted(src, 1.5, blur_usm, -0.5, 0, dst);
    imwrite("out.jpg", dst);

before:

after:

the data just isn’t there. filters can’t bring it back.

USM often helps, at least visually…, but you need to tune the parameters for optimal results, considering image size and content

this is all useless . . . .

the original picture is 3MB, after upload, it become 91kb, so I think it should be enough