Background Subtractor makes Image black
Posted by Influenza on Mar 14, 2014; 10:52am
URL: http://imagej.273.s1.nabble.com/Background-Subtractor-makes-Image-black-tp5006912.html
Hello everyone,
I postede this question a few months ago, but couldn't get any help until now and didn't find a similiar thread, so I just try again:
I'm trying to use the BackgroundSubtracter class in a PlugIn without calling the IJ.command.
I tried to do the following:
ImagePlus imp = WindowManager.getCurrentImage();
ImagePlus copy = new ImagePlus("title",(ImageProcessor)imp.getProcessor().clone());
double rad= 10;
ImageProcessor ip = copy.getProcessor();
BackgroundSubtracter bs =new BackgroundSubtracter();
bs.rollingBallBackground(ip, rad , false, false, false, false, false);
//bs.run(ip);
copy.updateAndDraw();
copy.show();
But equal to whether I use the .run() or the .rolingBallbackground() method, both outcoming images are just plain black.
Can anyone help me wiht the correct use, or find my mistake?
Best regards
Steve