I am using an GigEPRO camera and which has a capability of 60fps or more based on image size. Therefore for 60fps indicates 1 frame/16ms. But the videowriter function itself consumes 2-4ms. So I have decided to store the images in vector<Mat>
and create a child_thread that is responsible for writing the images to video using writer
function from OpenCV by accessing the images for the vector and erase the image stored.
I have few queries for this implementation.
Can I use the vector<Mat>
to store images or should I create a Queue.?
How can I synchronize the child_thread with main thread?
I am new to multi-threading programming therefore looking for some inputs