我已经尝试过这段代码,但在拼接器中出现错误。我有没有用 导入静态 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);
}
}
}
最佳答案
您还没有在代码中声明 stitcher
...
Stitcher stitcher = Stitcher.createDefault(false);
关于opencv - 使用JavaCV拼接图像 : compilation error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16585455/