Apply threshold and show the final image
Code: "image_catalano.py". Programming language: Python DMelt Version 2.4. Last modified: 03/03/2021. License: Pro
https://datamelt.org/code/cache/image_catalano_1432.py
To run this script using the DMelt IDE, copy the above URL link to the menu [File]→[Read script from URL] of the DMelt IDE.


from javax.swing import JOptionPane
from Catalano.Imaging  import FastBitmap
from Catalano.Imaging.Filters import Threshold
from jhplot import *

print Web.get("https://datamelt.org/examples/data/logo_jhepwork.png")

fb = FastBitmap("logo_jhepwork.png")
fb.toGrayscale()
t =Threshold(150)
t.applyInPlace(fb)
JOptionPane.showMessageDialog(None, fb.toIcon())



You see the box below because you did not login.