打开图像时,javacv 0.9出现了非常奇怪的错误。我到目前为止编写的代码是:
IplImage image = cvLoadImage("/path/to/image.png");
final CanvasFrame canvas = new CanvasFrame("test");
canvas.showImage(image);
canvas.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
按下按钮(IDEA 13.1中的jgoodies)后会弹出image.png
,但我得到以下错误:
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0
IDE表示错误源是这一行:
final CanvasFrame canvas = new CanvasFrame("test");
有人能帮助我吗?