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).

asked 2015-05-19 01:12:33 -0600

Govind Mali gravatar image
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?

edit retag flag offensive close merge delete

Comments

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?

thdrksdfthmn gravatar imagethdrksdfthmn ( 2015-05-19 02:17:57 -0600 )edit

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.

Govind Mali gravatar imageGovind Mali ( 2015-05-20 05:26:45 -0600 )edit

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... :(

thdrksdfthmn gravatar imagethdrksdfthmn ( 2015-05-20 06:32:25 -0600 )edit