Is there already a way to add custom metadata to cv::Mat or cv::UMat?
I'm building a framework that builds an image processing pipeline and would like to track cv::Mat or cv::UMat objects while they are processed. Especially, I would like to assign:
- a kind of identifying "serial number" or "frame index"
- one or more time stamps
- maybe also an id of the origin
I don't want to re-invent the wheel. Is there already some mechanism implemented to do this or do I need to implement a wrapper object that holds those additional information?
It's heavyweight and Ubuntu Linux-specific, but have you considered something like Robot Operating System?
a complete other library simply for passing content? o_O
Building a wrapper class or struct like @StevenPuttemans suggests is simple. The simplest solution that solves the problem is usually the best. If you're like me and building a lot of pipelines and many of them are networked between hosts of different architectures, well, that is a different problem entirely (but I've had to solve it different ways several times nonetheless, and something like ROS allows a general solution that works well with OpenCV).