Repository: opencv
Issue: GPU Stitcher run time error!
Labels: bug,category: t-api

##### System information (version)
- OpenCV => 3.2
- Qt 5.7.1
- Qt Creator 4.2.0
- Operating System / Platform => Windows 10 64 Bit
- Compiler => Visual Studio 2013 (msvc2013_64)
- GPU: Geforce GTX 1070
- Cuda 8.0

Code was succesfully compiled. I get this error at run time;

```
OpenCV Error: The function/feature is not implemented (Unknown/unsupported array type) in cv::_InputArray::getUMatVector, file D:\OpenSource\opencv32\source\opencv\modules\core\src\matrix.cpp, line 1470
The program has unexpectedly finished.
```

main code;

```
#include "mainwindow.h"
#include <QApplication>
#include <QDebug>
#include <QElapsedTimer>

#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/stitching.hpp>

using namespace cv;
using namespace cv::cuda;
using namespace std;

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    QElapsedTimer tTmr;
    tTmr.start();

    bool try_use_gpu = true;    // use GPU
    Stitcher stitcher = Stitcher::createDefault(try_use_gpu);

    stitcher.setWarper(new CylindricalWarperGpu());
    stitcher.setWaveCorrection(false);
    stitcher.setSeamEstimationResol(0.001);
    stitcher.setPanoConfidenceThresh(0.1);

    //stitcher.setSeamFinder(new cv::detail::GraphCutSeamFinder(cv::detail::GraphCutSeamFinderBase::COST_COLOR_GRAD));
    stitcher.setSeamFinder(new cv::detail::NoSeamFinder());
    stitcher.setBlender(cv::detail::Blender::createDefault(cv::detail::Blender::NO, try_use_gpu));
    //stitcher.setExposureCompensator(cv::detail::ExposureCompensator::createDefault(cv::detail::ExposureCompensator::NO));
    stitcher.setExposureCompensator(new cv::detail::NoExposureCompensator());

    std::vector<cv::Mat> images(3);
    std::vector<GpuMat> gpuImages(3);
    GpuMat pano_result_gpu;
    cv::Mat pano_result;
    bool firstTime = true;

    QString tImagePath = QApplication::applicationDirPath() + "/../../data/stitching_img";

    images[0] = imread((tImagePath + "/shanghai01.jpg").toStdString());
    images[1] = imread((tImagePath + "/shanghai02.jpg").toStdString());
    images[2] = imread((tImagePath + "/shanghai03.jpg").toStdString());

    for (int i = 0; i < 3; i++)
       gpuImages[i].upload(images[i]);

    if (firstTime)
    {
        Stitcher::Status status = stitcher.estimateTransform(gpuImages);//images);//

        qDebug()<<"Esimate Status: "<<status;

        firstTime = false;
    }

    Stitcher::Status status = stitcher.composePanorama(gpuImages, pano_result_gpu);//images, pano_result);//
    qint64 tTime = tTmr.elapsed();

    qDebug()<<"Panorama status: "<<status;

    pano_result_gpu.download(pano_result);

    imwrite("D:/stitching_result.jpg", pano_result);

    qDebug()<<"File Saved: "<<tTime;

    MainWindow w;
    w.show();

    return a.exec();
}
```

cmake output

```
FP16: Compiler support is available
found IPP (ICV version): 9.0.1 [9.0.1]
at: D:/OpenSource/opencv32/build/3rdparty/ippicv/ippicv_win
CUDA detected: 8.0
CUDA NVCC target flags: -gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-D_FORCE_INLINES
Could not find OpenBLAS include. Turning OpenBLAS_FOUND off
Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off
Could NOT find PythonInterp: Found unsuitable version "2.7.13", but required is at least "3.4" (found C:/Python27/python.exe)
Could NOT find PythonInterp: Found unsuitable version "2.7.13", but required is at least "3.2" (found C:/Python27/python.exe)
Could NOT find Matlab (missing:  MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN) 
Found VTK ver. 7.1.0 (usefile: D:/Developments/libs/VTK/lib/cmake/vtk-7.1/UseVTK.cmake)

General configuration for OpenCV 3.2.0 =====================================
  Version control:               unknown

  Platform:
    Timestamp:                   2017-01-15T21:10:18Z
    Host:                        Windows 10.0.14393 AMD64
    CMake:                       3.7.1
    CMake generator:             Visual Studio 12 2013 Win64
    CMake build tool:            C:/Program Files (x86)/MSBuild/12.0/bin/MSBuild.exe
    MSVC:                        1800

  C/C++:
    Built as dynamic libs?:      YES
    C++ Compiler:                C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_amd64/cl.exe  (ver 18.0.30723.0)
    C++ flags (Release):         /DWIN32 /D_WINDOWS /W4 /GR /EHa  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /wd4127 /wd4251 /wd4324 /wd4275 /wd4589 /MP8  /MD /O2 /Ob2 /DNDEBUG  /Zi
    C++ flags (Debug):           /DWIN32 /D_WINDOWS /W4 /GR /EHa  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /wd4127 /wd4251 /wd4324 /wd4275 /wd4589 /MP8  /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 
    C Compiler:                  C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_amd64/cl.exe
    C flags (Release):           /DWIN32 /D_WINDOWS /W3  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi    /MP8  /MD /O2 /Ob2 /DNDEBUG  /Zi
    C flags (Debug):             /DWIN32 /D_WINDOWS /W3  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi    /MP8  /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 
    Linker flags (Release):      /machine:x64  /INCREMENTAL:NO  /debug
    Linker flags (Debug):        /machine:x64  /debug /INCREMENTAL 
    ccache:                      NO
    Precompiled headers:         YES
    Extra dependencies:          C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib/x64/cuda.lib C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib/x64/nvcuvid.lib comctl32 gdi32 ole32 setupapi ws2_32 vfw32 vtkRenderingOpenGL vtkCommonCore vtksys vtkCommonDataModel vtkCommonMath vtkCommonMisc vtkCommonSystem vtkCommonTransforms vtkCommonExecutionModel vtkFiltersCore vtkIOImage vtkDICOMParser vtkmetaio vtkzlib vtkjpeg vtkpng vtktiff vtkImagingCore vtkImagingHybrid vtkRenderingCore vtkCommonColor vtkCommonComputationalGeometry vtkFiltersGeneral vtkFiltersGeometry vtkFiltersSources vtkInteractionStyle vtkFiltersExtraction vtkFiltersStatistics vtkImagingFourier vtkalglib vtkRenderingLOD vtkFiltersModeling vtkIOPLY vtkIOCore vtkFiltersTexture vtkRenderingFreeType vtkfreetype vtkIOExport vtkRenderingGL2PS vtkRenderingContext2D vtkRenderingContextOpenGL vtkgl2ps vtkIOGeometry vtkIOLegacy cudart nppc nppi npps cublas cufft -LIBPATH:C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib/x64
    3rdparty dependencies:       zlib libjpeg libwebp libpng libtiff libjasper IlmImf

  OpenCV modules:
    To be built:                 cudev core cudaarithm flann imgproc ml video viz cudabgsegm cudafilters cudaimgproc cudawarping imgcodecs photo shape videoio cudacodec highgui objdetect ts features2d calib3d cudafeatures2d cudalegacy cudaobjdetect cudaoptflow cudastereo stitching superres videostab
    Disabled:                    world
    Disabled by dependency:      -
    Unavailable:                 java python2 python3

  Windows RT support:            NO

  GUI: 
    QT:                          NO
    Win32 UI:                    YES
    OpenGL support:              NO
    VTK support:                 YES (ver 7.1.0)

  Media I/O: 
    ZLib:                        build (ver 1.2.8)
    JPEG:                        build (ver 90)
    WEBP:                        build (ver 0.3.1)
    PNG:                         build (ver 1.6.24)
    TIFF:                        build (ver 42 - 4.0.2)
    JPEG 2000:                   build (ver 1.900.1)
    OpenEXR:                     build (ver 1.7.1)
    GDAL:                        NO
    GDCM:                        NO

  Video I/O:
    Video for Windows:           YES
    DC1394 1.x:                  NO
    DC1394 2.x:                  NO
    FFMPEG:                      YES (prebuilt binaries)
      avcodec:                   YES (ver 57.64.101)
      avformat:                  YES (ver 57.56.100)
      avutil:                    YES (ver 55.34.100)
      swscale:                   YES (ver 4.2.100)
      avresample:                YES (ver 3.1.0)
    GStreamer:                   NO
    OpenNI:                      NO
    OpenNI PrimeSensor Modules:  NO
    OpenNI2:                     NO
    PvAPI:                       NO
    GigEVisionSDK:               NO
    DirectShow:                  YES
    Media Foundation:            NO
    XIMEA:                       NO
    Intel PerC:                  NO

  Parallel framework:            Concurrency

  Other third-party libraries:
    Use IPP:                     9.0.1 [9.0.1]
         at:                     D:/OpenSource/opencv32/build/3rdparty/ippicv/ippicv_win
    Use IPP Async:               NO
    Use Lapack:                  NO
    Use Eigen:                   NO
    Use Cuda:                    YES (ver 8.0)
    Use OpenCL:                  YES
    Use OpenVX:                  NO
    Use custom HAL:              NO

  NVIDIA CUDA
    Use CUFFT:                   YES
    Use CUBLAS:                  YES
    USE NVCUVID:                 YES
    NVIDIA GPU arch:             60 61
    NVIDIA PTX archs:
    Use fast math:               YES

  OpenCL:                        <Dynamic loading of OpenCL library>
    Include path:                D:/OpenSource/opencv32/source/opencv/3rdparty/include/opencl/1.2
    Use AMDFFT:                  NO
    Use AMDBLAS:                 NO

  Python 2:
    Interpreter:                 C:/Python27/python.exe (ver 2.7.13)

  Python 3:
    Interpreter:                 NO

  Python (for build):            C:/Python27/python.exe

  Java:
    ant:                         NO
    JNI:                         C:/Program Files/Java/jdk1.8.0_111/include C:/Program Files/Java/jdk1.8.0_111/include/win32 C:/Program Files/Java/jdk1.8.0_111/include
    Java wrappers:               NO
    Java tests:                  NO

  Matlab:                        Matlab not found or implicitly disabled

  Tests and samples:
    Tests:                       YES
    Performance tests:           YES
    C/C++ Examples:              NO

  Install path:                  D:/OpenSource/opencv32/build/install

  cvconfig.h is in:              D:/OpenSource/opencv32/build
-----------------------------------------------------------------

Configuring done
```

what is wrong?