I am in the process of programming a simple program that deals with object recognition. What causes problem is that I am considering and making a gui, but the problem here is that it won't let me call a method. I've looked around the site, but got no luck. Tried different suggestions from others, still nothing. I just don't know how I should call a method with different parameters.
Here's what I've tried..
public class Main {
    private static ImageProcessor ip;
    public static void main(String[] args) {
        Main_ m = new Main_();
        m.main(ip);
    }
}
Here's the desired method that I am trying to call..
public class Main_ implements PlugInFilter{
......
    public static String launch(ImageProcessor ip){
            ip  = FiltreGaussien_.apply(ip, 3);
            ImageProcessor result = Otsu_.apply(ip);
            Canny_ cannyFilter = new Canny_(result);
            result = cannyFilter.apply(5);
    
            Hough_ houghFilter = new Hough_(result);
            List<Line> lines = houghFilter.apply();
    
    
            try{
                Card card = new Card(lines);
                ip = card.extractCorner(ip);
                ImagePlus imp = new ImagePlus("...", ip);
                new ImageWindow(imp);
            }
            catch(RuntimeException e){
    
            }
    
            ip = Otsu_.apply(ip);
            TemplateMatching_ matcher = new TemplateMatching_();
            return matcher.launch(ip);
        }
}
And my console gives me this..
Exception in thread "main" java.lang.NullPointerException
    at ij.process.ByteProcessor.<init>(ByteProcessor.java:96)
    at main.mean.FiltreGaussien_.apply(FiltreGaussien_.java:69)
    at main.card_detection.Main_.launch(Main_.java:30)
    at main.card_detection.Main_.main(Main_.java:22)
    at main.Main.main(Main.java:11)
Process finished with exit code 1
What am I doing wrong?
 
    