I am using opencv fastNlMeansDenoising for very small dot noise present in B&W image.But It is taking more time(5 to 8 sec) to process an image(3306*4676).
public static BufferedImage despecklEffect(BufferedImage source){
System.loadLibrary( Core.NATIVE_LIBRARY_NAME );
Mat sourceImage=ImageProc.img2Mat(source);
Photo.fastNlMeansDenoising(sourceImage, sourceImage,50,7,21);
return ImageProc.mat2Img(sourceImage); }
How can i speed up this algorithm by changing parameters?
You can try to change one parameter at a time and see what is happening. You can also try a resize, maybe you can still preserve the info you need (then resize back)? Or you can process on regions where your interest area is? It depends a lot on your approach, what are you trying to do with the denoising?
I have done with resizing but still it is taking more time.I am using denosing to remove unwanted noise present in the document image.
IMHO the image is huge, so you'll need a specialised computer or you need to do some optimisation like GPU or something (or CL), and more, I think that Java is slower than C++ and I do not know about optimisation in Java... :(