Adjusting threshold without opening image window

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
kt7
Reply | Threaded
Open this post in threaded view
|

Adjusting threshold without opening image window

kt7
Whenever I run the following code I get an error that no windows are open. I know that i could rewrite as: IJ.open("path"+(i)+".jpg"); however i am trying t save the runtime from opening the windows for 900 images.
Thanks,
Kyle

for(int i=0; i<900; i++){
                        ImagePlus image1 =IJ.openImage("path"+(i)+".jpg");
                        ij.setThreshold(threshold, 255,"Black & White");
}