Contents
The following example shows various ways of adding, subtracting, multiplying and dividing images. The given example uses 2D images but the functionality generalizes for 3D images.
Adding and multiplying images
First I make different two example images that have the same dimensions
or try a = test_image_3d(2), a = test_image(0) etc - see the test image gallery.
Add/multiply/subtract/divide images and store the result in a new image
Add/multiply B and A, store result in A