private ImageProcessor hMinima(ImageProcessor ip, int m){
		ip.invert();
		ImageProcessor ip1 = ip.duplicate();
		ip1.subtract(m);
		GreyscaleReconstruct_ gr = new GreyscaleReconstruct_();
		Object[] result = gr.exec(new ImagePlus("temp", ip), new ImagePlus("temp1", ip1), "null", true, false);
		ip.invert();
		return ((ImagePlus) result[1]).getProcessor();
		
		//call matlab
	}