Answered step by step
Verified Expert Solution
Question
1 Approved Answer
4) In this problem, you will investigate a more efficient way to implement spatial filtering when all the filter coefficients have the same value. The
4) In this problem, you will investigate a more efficient way to implement spatial filtering when all the filter coefficients have the same value. The motivation comes from the observation that as you slide the filter one pixel at a time over the image and compute the sum-of-products of image and filter values, you can use the results from the previous computation in the current computation. Although the method can be generalized, we will consider the case in which all the filter coefficients have the value 1. And, we will also ignore the 12 scaling factor that typically accompanies an averaging filter of size nxn (a) Describe the algorithm you would use to compute the output value at location (x,y) given that you have already computed the result for location (x- 1y), for example, for an averaging filter of size nxn (think about what changes when you shift the filter by one pixel) (b) How many additions (in terms of n) does this require for each output pixel Count subtractions as additions. (c) Now, let's compare this with the standard approach of not using previous results. How many additions are required for each output pixel in this case. This should be in terms of n. (d) Compute the computational advantage of the more efficient approach. This is simply the ratio of the number of additions required by the standard approach to the number of additions required by the more efficient approach Again, this should be in terms of n
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started