SMIL 1.1.1
Loading...
Searching...
No Matches
thresholds.py
1from smilPython import *
2
3# Load an image
4im1 = Image("https://smil.cmm.minesparis.psl.eu/images/lena.png")
5im1.show()
6
7# Manual threshold (between 100 and 255)
8im2 = Image(im1)
9threshold(im1, 100, 255, im2)
10im2.show()
11
12# Otsu automatic threshold
13im3 = Image(im1)
14# Generate two threshold values (i.e. 3 classes)
15otsuThreshold(im1, im3, 2)
16# Display the resulting image with three labels values corresponding to the three classes
17im3.showLabel()