private static void fillNoiseRGB(ColorProcessor ip, boolean sp) { int width = ip.getWidth(); int height = ip.getHeight(); ByteProcessor rr = new ByteProcessor(width, height); ByteProcessor gg = new ByteProcessor(width, height); ByteProcessor bb = new ByteProcessor(width, height); if (sp) IJ.showProgress(0.0); rr.add(127); if (sp) IJ.showProgress(0.05); gg.add(127); if (sp) IJ.showProgress(0.10); bb.add(127); if (sp) IJ.showProgress(0.15); rr.noise(31); if (sp) IJ.showProgress(0.40); gg.noise(31); if (sp) IJ.showProgress(0.65); bb.noise(31); if (sp) IJ.showProgress(0.90); if (sp) IJ.showProgress(1.0); ip.setChannel(1,rr); ip.setChannel(2,gg); ip.setChannel(3,bb); }
private static void fillNoiseRGB(ColorProcessor ip, boolean sp) { int width = ip.getWidth(); int height = ip.getHeight(); ByteProcessor rr = new ByteProcessor(width, height); ByteProcessor gg = new ByteProcessor(width, height); ByteProcessor bb = new ByteProcessor(width, height); if (sp) IJ.showProgress(0.0); rr.add(127); if (sp) IJ.showProgress(0.05); gg.add(127); if (sp) IJ.showProgress(0.10); bb.add(127); if (sp) IJ.showProgress(0.15); rr.noise(31); if (sp) IJ.showProgress(0.40); gg.noise(31); if (sp) IJ.showProgress(0.65); bb.noise(31); if (sp) IJ.showProgress(0.90); if (sp) IJ.showProgress(1.0); ip.setChannel(1,rr); ip.setChannel(2,gg); ip.setChannel(3,bb); }