1 | initial version |
You might need to initialize the visualization window before creating the thread with
cv::namedWindow("2");
2 | improved answer |
You might need to initialize the visualization window before creating the thread with
cv::namedWindow("2");
[UPDATE]
Also, inside the thread function you should do:
pthread_exit(NULL);
Instead of
return NULL;
To comply with POSIX threads specifications.