1) Have you tried to compile your mex library using OpenCV 249? I am getting linker errors with that version, and it seems to me that they decided to remove some of the API functions (specifically cv::split and cv::merge) from that build. There do seem to be other overloads for those functions in version 249, but not in the way you are using them. I was able to get version 243 working, though.
2) When I try to connect to a camera using the following code:
camera = cv.VideoCapture();
frame = camera.read;
Immediately when the last line is run, Matlab crashes. What do you suggest when debugging these kinds of issues? It is possible that I am using an incompatible camera, but the OpenCV documentation on what cameras are compatible has not been updated for some time. What camera are you using?
Very good submission, though. I am still hoping to be able to connect to my camera, though.