In Example 2.56, we introduced a function quantize for compressing a grayscale image to use only five different shades of gray. (See Figure 2.59 for a reminder of the function.) Using basic arithmetic notation (including ⌊ ⌋ and/or ⌈ ⌉ if appropriate), redefine quantize without using cases.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here