import ij.process.*;
import ij.gui.*;
import java.awt.*;
import ij.plugin.filter.*;
public class Filter_Plugin1 implements PlugInFilter{
ImagePlus imp;
public int setup(String arg, ImagePlus imp) {
this.imp = imp;
return DOES_ALL;
}
public void run(ImageProcessor ip) {
int [ ]H=ip.getHistogram();
int w=ip.getWidth();
int h=ip.getHeight();
int k=256;
int a,b ;
for(int i=1;i
}
for(int i=0;i
b=(int)(a*(k-1)/(w*h));
ip.putPixel(i,j,b);
}}}}
2 comentarios:
Hola
En la linea 18 esta mal estructurado el for.
for(int i=1;i
Publicar un comentario