PDA

View Full Version : Saving a collection of QImages



davethomaspilot
24th August 2015, 13:37
I have to add a feature to an existing Qt application (running on Raspberry Pi) that will create sets of QIMages that correspond to images captured from a GiGe camera.

Four or five sets of three or four frames will be captured every 3.5 seconds (or slower). After the four are five sets are captured, the application will be idle for several minutes.

During each 3.5 second interval, the existing application displays an image from a different camera. Latency from when the camera exposes to display on a TV is critical. So, processing of the new sets of QImages needs to be minimal, or deferred to the idle time period (after all the camera frames have been captured. Otherwis, if too much CPU resource is required to do color conversion, compression, etc for this new feature, the latency for display of the single camera image will be impacted.

I need a way to group the images into sets so a viewer program can look at them one by one. Maybe I could use ffmpeg to add them to an AVI file, but with only four frames in each file, that's overkill. And, the cpu resource to encode the frames during the 3.5 second interval might not be acceptable.

I don't really need to play them as stream. I can write a simple reader that can get each frame out of the file on a separate platform.

An alternative I'm considering is to simply write the QImages as jpeg files with a timestamp as a part of the filename. Then use a database to save the filenames as records with a field that is used to associated each set.

Is there an better/easy way to write a small sequence of QImages to a file?

Thanks!