Previous | Next --- Slide 61 of 114
Back to Lecture Thumbnails
potato

How do you get the cost of convolution with separable filter in 2 X N X M^2? How would you multiply the row/column vectors in to get it?

motoole2

Instead of convolving an image with a 2D separable filter, we can instead perform two separate 1D convolution operations to our image. The first convolution is between a $M \times M$ image and a $1 \times N$ kernel. The second convolution is between the resulting $M \times M$ image (output from the first step) and a $N \times 1$ kernel. The cost of a convolution operation is $M^2 N$ in both cases (for every pixel in our image, we have to perform $N$ multiplication and addition operations). So the total cost is $2M^2 N$.