Function Repository Resource:

ImageSplitCompare

Source Notebook

Provide 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.

Details and Options

"LineStyle"Nonestyle values for the split line
"ImageMarker"NoneText or Graphics to use as a marker on the split line
Appearance"Horizontal"the direction the split line can be dragged. "Horizontal" or "Vertical"

Examples

Basic Examples (1) 

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/48c33215-4e35-483c-9d8b-da2f8d19728b"]
Out[1]=

Scope (2) 

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/94173e3e-3e87-455b-8596-0331f1b7409c"]
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/7b6bb9f4-7987-4a56-a22d-35f27461284f"]
Out[3]=

Options (4) 

Use "LineStyle" to change the appearance of the join line:

In[4]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/3dacf934-d972-40a3-a11f-4e4cd177917a"]
Out[4]=

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

In[5]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/a75ceff3-79b7-4376-b280-a9d1b86355ac"]
Out[5]=

Use Appearance to change the direction of interactivity:

In[6]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/c124e4f1-5f44-49e9-843b-bd620b2876ac"]
Out[6]=

Combine options:

In[7]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/b37241a8-2112-4373-9f9c-ff6c5bcd2402"]
Out[7]=

Publisher

Jon McLoone

Requirements

Wolfram Language 11.3 (March 2018) or above

Version History

  • 3.0.0 – 08 April 2020
  • 2.0.0 – 28 February 2020
  • 1.0.0 – 28 February 2019

License Information