Stitching without warping

asked 2016-06-20 02:12:10 -0600

updated 2020-10-08 02:41:09 -0600

Hello. Now I use opencv for stitchig. But the code is not working fast. I looked at that thing takes a long time a mask and image warping. Here:

    Mat K;
    cameras[img_idx].K().convertTo(K, CV_32F);
    warper->warp(img, K, cameras[img_idx].R, INTER_NEAREST, BORDER_CONSTANT, img_warped);
    mask.create(img_size, CV_8U);
    mask.setTo(Scalar::all(255));
    warper->warp(mask, K, cameras[img_idx].R, INTER_NEAREST, BORDER_CONSTANT, mask_warped);

Therefore, I decided to turn it off and do a simple assignment.

img_warped = img.clone();

etc...

But the ever-memory exception error occurs. Maybe someone has already done it?

edit retag flag offensive close merge delete

Comments

There is an awful lot of context missing. What is img? What is the method .K()? What is the array cameras?

Tetragramm gravatar imageTetragramm ( 2016-06-20 17:07:06 -0600 )edit