Ask Your Question
1

Is there already a way to add custom metadata to cv::Mat or cv::UMat?

asked 2017-12-04 07:30:16 -0600

sdwarfs gravatar image

updated 2017-12-06 16:48:46 -0600

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?

edit retag flag offensive close merge delete

Comments

It's heavyweight and Ubuntu Linux-specific, but have you considered something like Robot Operating System?

opalmirror gravatar imageopalmirror ( 2017-12-08 15:30:08 -0600 )edit

a complete other library simply for passing content? o_O

StevenPuttemans gravatar imageStevenPuttemans ( 2017-12-09 05:52:33 -0600 )edit

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).

opalmirror gravatar imageopalmirror ( 2017-12-11 12:52:18 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
4

answered 2017-12-04 08:00:32 -0600

I have always done it with a struct, containing a Mat and a vector<values>. AFAIK there is no built-in functionality for that.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-12-04 07:29:16 -0600

Seen: 2,202 times

Last updated: Dec 06 '17