Write Date On Image

This function block adds the current date and time text onto an image. Use it when you need timestamped images for logging, inspection or traceability.

πŸ“₯ Inputs

Image Any Provide the image you want to annotate with the current date/time.

πŸ“€ Outputs

Image Any The same image with the date/time text drawn onto it.

πŸ•ΉοΈ Controls

Font Scale Adjusts the relative size of the date text.

Horizontal Position Move the text left or right across the image (0 = left, 1 = right).

Vertical Position Move the text up or down on the image (0 = top, 1 = bottom).

Font Thickness Set the stroke thickness of the text.

Font Choose from several font styles (e.g., Simplex, Duplex, Complex).

Color Choose the text color (e.g., White, Black, Red, Green, Blue).

🎨 Features

  • Automatic timestamping with current date and time every time the block runs.

  • Scalable and positionable text so the timestamp fits different resolutions and layouts.

  • Multiple font and color options for readability on different backgrounds.

πŸ“ Usage Instructions

  1. Connect an image source to the Image Any input (for example, a camera or an image loader).

  2. Adjust Font Scale and Font Thickness to achieve the desired text size.

  3. Move the text using Horizontal Position and Vertical Position so it does not overlap important image content.

  4. Choose a readable Font and Color for the background you expect.

  5. The block outputs the annotated image via Image Any. Use that output for display, saving, or further processing.

πŸ“Š Evaluation

When the block runs it reads the current date/time, renders it onto the provided image using the chosen font, size, thickness and color, and then outputs the annotated image.

πŸ’‘ Tips and Tricks

  • For a quick preview, connect the output to the Show Image block so you can inspect placement and readability live.

  • If you need custom text in addition to the date, pair this block with the Write Text On Image block to add both timestamp and custom annotations.

  • To save timestamped images automatically, send the output to Image Logger or Image Write.

  • If the image size is large or small, use Image Resize before this block so the text scale behaves predictably.

  • When the timestamp overlaps important content, use Image Padding or crop with Image ROI to make space for the text.

πŸ› οΈ Troubleshooting

  • If the text is too large or clipped, reduce Font Scale or move it with Horizontal Position/Vertical Position.

  • If timestamp is hard to read over the background, try a contrasting Color (white on dark backgrounds, black on bright backgrounds) or adjust Font Thickness.

  • If nothing appears on the output, ensure the input to Image Any is a valid image and not empty.

Last updated

Was this helpful?