SMIL 1.1.1
Loading...
Searching...
No Matches
multichannel_operations.py
1from smilPython import *
2
3# Load a RGB image
4im1 = Image("https://smil.cmm.minesparis.psl.eu/images/arearea.png")
5im1.show()
6
7# Copy the green channel into a UINT8 image
8im2 = Image()
9copyChannel(im1, 1, im2)
10im2.show()
11
12# Split RGB channels into a 3D UINT8 image with 3 slices (one for each channel)
13im3 = Image()
14splitChannels(im1, im3)
15im3.show()
16
17# Perform a 2D dilation on the slices
18im4 = Image(im3)
19dilate(im3, im4)
20im4.show()
21
22# And merge the result into a RGB image
23im5 = Image(im1)
24mergeChannels(im4, im5)
25im5.show()