3

我使用 JavaCV 拼接图像,但控制台输出以下内容:

Finding features...
Features in image #1: 888
Features in image #2: 1483
Finding features, time: 0.523706 sec

Pairwise matching
1->2 matches: 456
1->2 & 2->1 matches: 485

.Pairwise matching, time: 0.14468 sec

Removed some images, because can't match them or there are too similar images: (2).

Try to decrease --match_conf value and/or check if you're stitching duplicates.

Need more images

这是我的代码:

public static void main(String[] args) {

    Stitcher stitcher = Stitcher.createDefault(true);

    MatVector images2 = new MatVector(2);

    images2.put(1, cvLoadImage("sample1.png"));
    images2.put(0, cvLoadImage("sample2.png"));

    IplImage result = new IplImage();


    int status = stitcher.stitch(images2, images2);

    result = cvLoadImage("sample1.png");

    final CanvasFrame canvas = new CanvasFrame("My Image", 1);


    canvas.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE);

    // Show image on window.
    canvas.showImage(result);

}

他们可以加载图像但没有拼接图像,为什么?

4

1 回答 1

1

输出很清楚:“删除了一些图像,因为无法匹配它们或图像太相似:(2)。尝试降低--match_conf值和/或检查是否正在拼接重复项。

你的图片是不是太相似了?如果您不确定,请尝试使用此处提供的图像。他们应该工作。

如果它仍然不起作用,请调查--match_conf.

于 2013-07-09T08:25:14.877 回答