Wolfram Research

Function Repository Resource:

ImageSplitCompare

Source Notebook

A dynamic interface for comparing two images

Contributed by: Jon McLoone

ResourceFunction["ImageSplitCompare"][img1,img2]

shows img1 composed with img2 with a draggable divider.

ResourceFunction["ImageSplitCompare"][Dynamic[var],img1,img2]

shows img1 composed with img2 with a draggable divider at position var.

ResourceFunction["ImageSplitCompare"][Dynamic[var],img1,img2, size, method]

shows img1 composed with img2 with a draggable divider at position var, using size and method to conform the images first.

Examples

Basic Examples

Compare two images. Click and drag the divider line to change the split:

In[1]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/ea85cff2-10ea-46c1-8a6a-32c59724db16"]
Out[1]=

Scope

The position of the divider line can be controlled and retrieved using:

In[2]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/8be51ebc-d9dc-46fa-88f9-e6784b49e472"]
Out[2]=

ImageSplitCompare takes the same arguments as ConformImages:

In[3]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/e929b828-ec1a-4f0e-bd63-fa65a97d7837"]
Out[3]=

Options

Use "ImageMarker" to place a visual marker on the interactive join line:

In[4]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/80d10c37-53f3-43e0-853b-64a97e527fe1"]
Out[4]=

Use Appearance to change the direction of interactivity:

In[5]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/d4bf271b-6f34-4a36-90e2-5318618cd7e1"]
Out[5]=
In[6]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/7685c95d-a138-4420-91ff-de228d8ab9b1"]
Out[6]=

Requirements

Wolfram Language 11.3 (March 2018) or above

Resource History

License Information