task 9
This commit is contained in:
parent
979807f399
commit
791f6b7b88
@ -2,6 +2,7 @@ package livefilter
|
|||||||
|
|
||||||
import com.github.sarxos.webcam.WebcamPanel.DrawMode
|
import com.github.sarxos.webcam.WebcamPanel.DrawMode
|
||||||
import com.github.sarxos.webcam.{Webcam, WebcamImageTransformer, WebcamPanel, WebcamResolution}
|
import com.github.sarxos.webcam.{Webcam, WebcamImageTransformer, WebcamPanel, WebcamResolution}
|
||||||
|
import imagefilters.ImageFilters
|
||||||
|
|
||||||
import java.awt.image.BufferedImage
|
import java.awt.image.BufferedImage
|
||||||
import java.awt.{Color, Dimension}
|
import java.awt.{Color, Dimension}
|
||||||
@ -87,7 +88,7 @@ class LiveFilter extends WebcamImageTransformer {
|
|||||||
val img: Array[Array[Color]] = toArray(image)
|
val img: Array[Array[Color]] = toArray(image)
|
||||||
|
|
||||||
// TODO Complete here by changing the assignment with your filters
|
// 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)
|
updateImage(filtered, image)
|
||||||
return image
|
return image
|
||||||
|
Loading…
Reference in New Issue
Block a user