google / mediapy

This Python library makes it easy to display images and videos in a notebook.
https://pypi.org/project/mediapy/
Apache License 2.0
389 stars 18 forks source link

Add media.compare_images() #35

Closed hhoppe closed 1 year ago

hhoppe commented 1 year ago

Addresses issue #33 .

Compare two images using an interactive slider.
  Displays an HTML slider component to interactively swipe between two images.
  The slider functionality requires that the web browser have Internet access.
  See additional info in `https://github.com/sneas/img-comparison-slider`.
  >>> image1, image2 = np.random.rand(64, 64, 3), color_ramp((64, 64))
  >>> compare_images([image1, image2])