Hey hey,
I'm writing one program with calcOpticalFlowPyrLK, but with 2 cams. When I run the code for just one of them it's OK, but wen try to run the code on other thread it trow exception...
the code:
...
pthread_t TCam0;
Med Cam0; //structure for data
Cam0.ch=0; //cam number : 0,1,2,,,
Cam0.result=(int*)malloc(sizeof(int));
pthread_create (&TCam0, NULL, &thread_detect, (void*)&Cam0); //crashes on calcOpticalFlowPyrLK
thread_detect(&Cam0); //working
...
OpenCV Error: Assertion failed (depth == CV_8U) in calcSharrDeriv, file C:/slave/builds/WinInstallerMegaPack/src/opencv/modules/video/src/lkpyramid.cpp, li
ne 53
terminate called after throwing an instance of 'cv::Exception'
what(): C:/slave/builds/WinInstallerMegaPack/src/opencv/modules/video/src/lkpyramid.cpp:53: error: (-215) depth == CV_8U in function calcSharrDeriv
any idea ?