duchengyao / gpu-based-image-stitching

A simple version of "GPU based parallel optimization for real time panoramic video stitching".
73 stars 8 forks source link

拼接报错 #2

Closed JackSparrow3 closed 1 year ago

JackSparrow3 commented 1 year ago

尝试自己拍了两个视频进行拼接,但是在线程里面报错了, 输出 roi[1620 x 1011 from (-680, 1355)] terminate called after throwing an instance of "cv::exception" what(): opencv(4.4.0) /root/app/src/opencv/modules/core/src/umatrix.cpp:299: error (-215:Assertion failed) s>=0 in function "setSize" 不知道是哪块的问题,可以共享下测试数据吗?

duchengyao commented 1 year ago

关于测试数据: https://github.com/duchengyao/gpu-based-image-stitching/issues/1

另外,是哪一行报的这个错

JackSparrow3 commented 1 year ago

是app.cpp 的56行,其中image_roi_vect[0].height 为-147 小于零所以报错了; 我把image_roi_vect 打印了下,是[2530x-147] ,没搞明白为什么这块是计算了个负的,是因为匹配点检测问题吗? @duchengyao

duchengyao commented 1 year ago

@JackSparrow3 有时间的话你可以看一下这行所有变量的数值,是哪个值异常导致的height为负。

https://github.com/duchengyao/gpu-based-image-stitching/blob/5b316af4f8604bbf29c66c756afd4e7f2f3f1a1a/src/stitching_param_generater.cc#L288-L289