In the proxy-camera (opencvdevice.cpp), the width and height properties of the cv::VideoCapture are set. However, the change does never seem to be applied. The following code
if (m_capture->isOpened()) {
std::cout << "Open. width: " << a_width << " height: " << a_height << std::endl;
m_capture->set(CV_CAP_PROP_FRAME_WIDTH, a_width);
m_capture->set(CV_CAP_PROP_FRAME_HEIGHT, a_height);
std::cout << "After. width: " << m_capture->get(CV_CAP_PROP_FRAME_WIDTH) << " height: " << m_capture->get(CV_CAP_PROP_FRAME_HEIGHT) << std::endl;
}
Open. width: 800 height: 600
After. width: 1280 height: 720
In the case above, the image read from the cv::VideoCapture was stored in a shared image of a different size. This caused the image, when it was unpacked from the shared image, to be corrupt/wrong.
This happened on a machine running Ubuntu 14.04 LTS.