Question

I have tried this code and it is gives error with the stitcher. whether I have use import static com.googlecode.javacv.cpp.opencv_stitching.Stitcher; it is give the same error with the stitcher. If you can please can I have a solution for this issue please. Thank you.

code is..

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);
        }
    }
}
Was it helpful?

Solution

You haven't declared stitcher in your code...

Stitcher stitcher = Stitcher.createDefault(false);

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top