I have the input image :

and the output of vein detection for the leaf using a Gabor filter, but the output is really noisy:

I tried using Total variation denoising however the results are not good:

However I don't want to loose the fine details in the leaf's veins, so a median filter won't suit my problem