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: