954,483 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

store run-time variables in C++

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

harvybcn
Newbie Poster
2 posts since Sep 2010
Reputation Points: 10
Solved Threads: 0
 

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.

Fbody
Posting Maven
2,930 posts since Oct 2009
Reputation Points: 833
Solved Threads: 393
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: