Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8121113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:22:39+00:00 2026-06-06T05:22:39+00:00

I am trying to stitch multiple images by using JavaCV 0.1 and OpenCV 2.4.0

  • 0

I am trying to stitch multiple images by using JavaCV 0.1 and OpenCV 2.4.0 in Java, i use this code for stitching images :

stitcher = Stitcher.createDefault(false);

MatVector images = new MatVector(imageN.size());
for(...){
   CvArr image = cvLoadImage(imageN);
   images.put(index,image);
}

MatVector result = new MatVector(1);
int status = stitcher.stitch(images,result);

if( status == stitcher.OK )
{
   cvSaveImage(result.getIplImage(0));
}

NOTE 1 : Loaded images in this example are valid image for stitching.

NOTE 2 : C++ version of the code runs with no problem on current configuration

In stitcher.stitch method opencv throws an assertion exception such as “k == MAT”. How should i fix this? Is MatVector usage is right in this sample code?

Thanks…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T05:22:42+00:00Added an answer on June 6, 2026 at 5:22 am

    I found it, it is a bug related with JavaCv.

    Actually JavaCv is not guilty.OpenCV stitcher API uses cv::OutputArray for returning stitched image but this method casts cv::OutputArray to cv::Mat when executing. JavaCV ports OpenCV method only by using parameter interface and so it converts the parameter as std::vector, this results as a assertion failure.

    It is required to convert std::vector to Mat to make it working. I don’t know any other way exist for this conversion but otherwise it is possible to be fixed by only lib’s author.

    It is said that c++ version is working but in fact, it is working when pano parameter is given as cv::Mat, when std::vector is entered it gives the same failure assertions again.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to use OpenCV and Python to stitch together several hundred puzzle
I'm trying to use the Fancy Zomm jQuery plugin to show multiple images in
Just trying to figure out how to use many multiple cases for a Java
Full context: I'm trying to process multiple files using a grails Application. The code
I am trying to stitch two images together, but only the first one can
I'm currently trying to write a multiple-file Python (2.6.5) game using PyGame. The problem
I'm trying to use GMFBridge to switch between multiple stream buffer graphs and I
I am using CraueFormFlowBundle to have a multiple page form, and am trying to
I am trying to use multiple emulators for the same project and running into
I'm trying to get multiple markers on a Google map using API V3. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.