I want to use find edges option of the ImageJ, have the edges-found array and save it to another file programatically.
ImagePlus ip1 = IJ.openIm
ImageProcessor is an abstract class, that lets the derived classes provide the appropriate implementation. You need to declare ip as type ColorProcessor:
ip
ColorProcessor
ColorProcessor ip = new ColorProcessor(ip1.getWidth(), ip1.getHeight()); ip.findEdges();