I would like to store Mat data into something that I can write to a .CSV file.
So I have a function that returns rvec and tvec. Rvec is the rotation vector from the Rodrigues function. Tvec is the translation vector from solvePnPRANSAC function. Rvec and Tvec are both of type Mat.
I am looping through a video file and want to save each iteration of rvec into a single nx3 array and each iteration of tvec into a different nx3 array.
I think the simplest way is to use .push_back.
What is the simplest way to do this and write the final arrays to a CSV file?