Skip to content

Instantly share code, notes, and snippets.

@RaphaelMeudec
Last active July 19, 2019 14:47
Show Gist options
  • Save RaphaelMeudec/7982c4595236a1f584fac59d102f4cae to your computer and use it in GitHub Desktop.
Save RaphaelMeudec/7982c4595236a1f584fac59d102f4cae to your computer and use it in GitHub Desktop.
Image logging with the VisualLogging library
import logging
import cv2
import numpy as np
import vlogging
logger = logging.getLogger("demo")
fh = logging.FileHandler('test.html', mode="w")
logger.setLevel(logging.DEBUG)
logger.addHandler(fh)
image = cv2.imread('sample_image.png')
logger.info(vlogging.VisualRecord('Sample Image', image, {'footnote': 'sample image'}, fmt='png'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment