From 791f6b7b884b2100dbaae6fa33769244c90eb0ab Mon Sep 17 00:00:00 2001 From: LordBaryhobal Date: Tue, 5 Dec 2023 12:49:58 +0100 Subject: [PATCH] task 9 --- src/livefilter/LiveFilter.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/livefilter/LiveFilter.scala b/src/livefilter/LiveFilter.scala index d1ba393..08bc521 100644 --- a/src/livefilter/LiveFilter.scala +++ b/src/livefilter/LiveFilter.scala @@ -2,6 +2,7 @@ package livefilter import com.github.sarxos.webcam.WebcamPanel.DrawMode import com.github.sarxos.webcam.{Webcam, WebcamImageTransformer, WebcamPanel, WebcamResolution} +import imagefilters.ImageFilters import java.awt.image.BufferedImage import java.awt.{Color, Dimension} @@ -87,7 +88,7 @@ class LiveFilter extends WebcamImageTransformer { val img: Array[Array[Color]] = toArray(image) // TODO Complete here by changing the assignment with your filters - val filtered: Array[Array[Color]] = img + val filtered: Array[Array[Color]] = ImageFilters.mask(ImageFilters.sepia(ImageFilters.noise(img, 10)), videoMask) updateImage(filtered, image) return image