task 3
This commit is contained in:
@@ -7,8 +7,11 @@ object ImageProcessingApp extends App {
|
||||
val imageFile = "./res/collins_eileen.png"
|
||||
val org = new ImageGraphics(imageFile, "Original", -500, -250)
|
||||
val dest = new ImageGraphics(imageFile, "Duplicate", 0, -250)
|
||||
val thresh = new ImageGraphics(imageFile, "Threshold", -500, 250)
|
||||
|
||||
// Simple copy and display
|
||||
val newPixels = ImageFilters.duplicate(org.getPixelsBW())
|
||||
dest.setPixelsBW(newPixels)
|
||||
|
||||
thresh.setPixelsBW(ImageFilters.threshold(newPixels, 128))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user