I have a C++ program that continuously takes depth frames from a kinect sensor (usung opencv) and saves them to a png. I have another MATLAB script that reads these images and processes them.
The problem is that MATLAB fails to read the png since the C++ program is likely overwriting the file faster than MATLAB can read it. I figured that if the image writes and reads could be synchronized, the problem can be solved.
What could be the simplest way to achieve this? I'm willing to take a some performance hit as long as the solution works.