Find Edges with ImageJ Programmatically

喜你入骨 提交于 2019-12-02 01:07:02

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();

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();
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!