- 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.
How can I simultaneously acquire images and save them to disk as TIFF files?
5 views (last 30 days)
MathWorks Support Team on 24 Jul 2017
The videoinput DiskLogger functionality uses MATLAB VideoWriter to save images to a video file.
Since the video file formats supported by VideoWriter are not the best option for my application, I would instead prefer to save the acquired images into TIFF file format for later processing.
Is there example code for how this can be achieved?
MathWorks Support Team on 22 Aug 2019
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:
More Answers (0)