Find Edges with ImageJ Programmatically

后端 未结 2 981
傲寒
傲寒 2021-01-22 18:28

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         


        
相关标签:
2条回答
  • 2021-01-22 19:17

    ImageProcessor is an abstract class, that lets the derived classes provide the appropriate implementation. You need to declare ip as type ColorProcessor:

    ColorProcessor ip = new ColorProcessor(ip1.getWidth(), ip1.getHeight()); 
    ip.findEdges();
    
    0 讨论(0)
  • 2021-01-22 19:22

    OK, I got the solution, the problem was that I didn't connect the ColorProcessor with the image.

    ColorProcessor ip = new ColorProcessor(ImageIO.read(new File("my_image.jpg")));
    ip.findEdges();
    BufferedImage bimg = ip.getBufferedImage();
    
    0 讨论(0)
提交回复
热议问题