3

我已经尝试过这段代码,它给出了缝合器的错误。我是否使用过 import static com.googlecode.javacv.cpp.opencv_stitching.Stitcher;它与缝合器给出相同的错误。如果可以的话,请给我一个解决这个问题的方法。谢谢你。

代码是..

public class ImageStitching {

    public static void main(String[] args){
        MatVector images = new MatVector(2);
        images.put(0,cvLoadImage("sample1.png"));
        images.put(1,cvLoadImage("sample2.png"));

        IplImage result = new IplImage(null);
        int status = stitcher.stitch(images,result);

        if( status == stitcher.OK )
        {
            cvSaveImage("result.png", result);
        }
    }
}
4

1 回答 1

3

您尚未stitcher在代码中声明...

Stitcher stitcher = Stitcher.createDefault(false);

于 2013-05-16T12:14:08.853 回答