E_learner
E_learner

Reputation: 3582

OpenCV: declaring GPU matrix

In OpenCV 2.4.3, I am trying to delcare one GPU matrix in this way:

cv::VideoCapture video;
video.open("sample.avi");
cv::Mat source;
for ( int n = 0; n < 500; n ++ )
{
    video >> source; 
    cv::gpu::GpuMat gpuMat ( source );
}

Then I got the following error for the gpu matrix declaration:

Error: incomplete type is not allowed

What mistake did I make here? Thanks.

Upvotes: 2

Views: 2002

Answers (2)

LiberiFatali
LiberiFatali

Reputation: 315

For opencv4, try this

#include <opencv2/cudaarithm.hpp>

fixed problem for me

Upvotes: 0

tempvar
tempvar

Reputation: 421

Usually this is associated with missing an include statement. Double check all the necessary includes are present.

Upvotes: 2

Related Questions