0
$\begingroup$

I have 2 images that I combined image1 on top and image2 bottom:

combine = ImageAssemble[{{image1}, {image2}}]

Now I want to manipulate the bottom image while showing both images. I tried:

Manipulate[Show[image1, ImageTransformation[image2,Sin[a Pi #]^2&,{a, -1,4}]]]

but Show gave an error as it expects graphics.

I then thought ImageTake might help and tried:

Manipulate[ImageTransformation[ImageTake[combine,-150],Sin[a Pi #]^2&,{a, -1,4}]]

I was left out with only the bottom picture (cropped the image).

I would appreciate any suggestions to show both images but manipulate only the second one.

$\endgroup$
  • $\begingroup$ It's unclear to me what you are asking. I suggest you edit your question to clarify, otherwise the question may be put on-hold. Learn about good questions here. Also, next time try to use the correct formatting. (Follow the links). $\endgroup$ – rhermans Sep 27 '17 at 14:53
  • $\begingroup$ @rhermans Thanks for the links. I've added an example image and an example transformation function. I am trying to apply this function to only the bottom half of the assembled image. Let me know if the question needs more clarification, and how. $\endgroup$ – user94948 Sep 27 '17 at 15:42
1
$\begingroup$

I might try to do the transformation inside the ImageAssemble:

img = ExampleData[{"TestImage", "Tree"}];
ImageAssemble[{{img}, {ImageTransformation[img, Sin[Pi #]^2 &]}}]

enter image description here

To use this in a Manipulate is then straightforward:

Manipulate[ImageAssemble[{{img}, {ImageTransformation[img, 
      Sin[Pi a # ]^2 &]}}], {a, 0.2, 2}]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.