CP2: Thresholding – Image Filters
Автор: Jeff Thompson
Загружено: 2021-02-24
Просмотров: 495
Описание:
One of the simplest filters we can write ourselves is a threshold filters. If a pixel's brightness is above a set threshold we make the pixel white, if below we make it black. The threshold can be tuned based on the source image. Thresholding is a useful first step for blob detection, as we'll see later!
(For a fancier version that takes into account regions of light and dark in an image, see the Adaptive Threshold example – no video for that, though 😭)
👩💻 https://editor.p5js.org/jeffThompson/...
ALL THE VIDEOS IN THIS UNIT
🎥 • CP2: Week 03 (Image Filters)
CHALLENGES
❓ Can you make this example interactive, where the mouse controls the threshold value? (Hint: use map() to convert the mouse coords into the range 0–255.)
❓ This demo uses get() and set(), which can be slow with large images – can you convert this to use the pixels array instead?
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: