Image Logger

This function block saves incoming image frames to disk with configurable file naming, format and storage limits. Use it to capture and archive images when a trigger signal is received, or to periodically dump images for inspection.

πŸ“₯ Inputs

Folder Path - Destination folder where images will be saved. Provide a valid path.

File Name - Optional file name. If empty, a timestamp-based name will be used.

Image Limit - Optional maximum number of images to keep in the folder. When the limit is exceeded, the oldest images are removed.

Input Image - Image data to be saved. Connect any image-producing block to this input.

Trigger - Boolean trigger that controls saving. When the trigger condition is active, the image will be written according to the configured settings.

πŸ“€ Outputs

This function block does not produce any outputs.

πŸ•ΉοΈ Controls

Save Mode - Dropdown control to choose between Full Size (PNG) and Compressed (JPEG) saving modes. Compressed mode reduces file size at the cost of quality.

🎨 Features

  • Automatic timestamp naming when File Name is not provided.

  • Optional image compression to reduce disk usage.

  • Folder image count limit with automatic deletion of oldest files to enforce the limit.

  • Works with any incoming image source (cameras, loaders, or processed images).

  • Clear error and info messages are logged when saving succeeds or fails.

πŸ“ Usage Instructions

  1. Set the destination by providing Folder Path or use a block that supplies it.

  2. Optionally provide a File Name; leave empty to use an automatic timestamp name.

  3. Optionally set Image Limit to control how many images are kept in the folder.

  4. Connect an image source to Input Image.

  5. Use Trigger to control when images are written. Toggle the trigger to save the current image.

  6. Choose the desired Save Mode for PNG or compressed JPEG output.

πŸ“Š Evaluation

When the block receives a valid Input Image and the Trigger condition is satisfied, it attempts to save the image to the provided Folder Path using the chosen Save Mode. If the folder contains more images than Image Limit, the oldest files are removed to respect the limit. Informational messages indicate success; error messages explain failures (invalid path, write permissions, etc.).

πŸ’‘ Tips and Tricks

  • Use Choose Folder to let users visually pick the target folder and feed it into Folder Path.

  • Use Date-Time (timestamp) together with File Name to create human-readable names for chronological sorting.

  • Preview images before saving by sending the same image to Show Image so you can inspect frames visually.

  • Reduce disk usage by adding an Image Resizer before this block to downscale very large images prior to saving.

  • When capturing from live sources, combine with Camera USB, Camera IP (ONVIF), or Stream Reader as the image provider to archive frames from cameras or streams.

  • If you need structured metadata alongside files, send detection/measurement outputs to CSV Export to log details (file name, timestamp, counts).

  • Use File/Folder Operations to create folders or manage saved files programmatically before or after logging.

  • For application flows that write multiple images at once, consider Multi Image Write or Image Write blocks as alternatives when you need different naming or trigger behaviour.

πŸ› οΈ Troubleshooting

  • Invalid folder errors: check that Folder Path exists and the application has write permissions. Use File/Folder Operations to create required folders first.

  • No image saved: verify that Input Image is connected and that Trigger is active when you expect a save.

  • Images accumulate too many files: set a reasonable Image Limit or run a cleanup routine using File/Folder Operations.

  • Large files slow down saving: switch Save Mode to Compressed or add an Image Resizer upstream.

  • If filenames collide, include a timestamp (via Date-Time) or an index to ensure unique names.

Last updated

Was this helpful?