This is about a C++ problem.

I have an object tracking program that takes images from 0,...,n in a loop. At current frame the computations are based on previous frames, therefor I need to hold those variables, matrices, etc for later use. This program has to be integrated now into another system which will provide an image and I have to return the tracking output. The system does later other processes, so my program has to become function.

I need to store my variables and matrices from previous images in order to use them again. I don't know if the best practice is to write them in hard drive and read them again in another instance. If this is the case what is the best way and data type/file to write/read. The systems aims to be real-time.

Thanks

By their very nature, files are slow, if you need a fast system, you should keep information that is frequently accessed in RAM.

I would some sort of static data structure, then just keep pushing and popping pointers to your image objects. Just make sure you delete the popped object(s) after you are done with them to prevent leaks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.