Refer to attached "basic_gige_log_TIFF.m" and "basic_saveImageData.m" for a simple example on how to simultaneously acquire images and save them to disk as TIF files.
Since saving each acquired frame to disk uses imwrite, which is a blocking MATLAB function, at higher frame rates or higher frame sizes, the image file writing operation might not be able to keep up with the acquisition, resulting in an acquired frames backlog and increased memory usage.
In this situation, if Parallel Computing Toolbox is available, there is an option to improve performance by doing the file writing operation in a separate worker using parfeval.
Refer to attached "*gige_log_parfeval.zip*" which includes:
- example code "gige_log_TIFF.m" and required functions "saveImageData.m", "writeTIFF.m", and "checkFuturesErrors.m"
- example code "basic_gige_log_TIFF.m" and required functions "basic_saveImageData.m" and "writeTIFF.m", which does not use Parallel Computing Toolbox. This is included for comparison with the example which uses parfeval.