1

The documentation for OpenCV provides the following convolution explanation

Assume you want to know the resulting value of a particular location in the image. The value of the convolution is calculated in the following way:

Place the kernel anchor on top of a determined pixel, with the rest of the kernel overlaying the corresponding local pixels in the image. Multiply the kernel coefficients by the corresponding image pixel values and sum the result. Place the result to the location of the anchor in the input image. Repeat the process for all pixels by scanning the kernel over the entire image. Expressing the procedure above in the form of an equation we would have:

$$\mathrm { H } ( x , y ) = \sum _ { i = 0 } ^ { M _ { i } - 1 } \sum _ { j = 0 } ^ { M _ { i } - 1 } I \left( x + i - a _ { i } , y + j - a _ { j } \right) K ( i , j )$$ I understand what a convolution is, and how the process works, but I do not understand that summation equation.

Can somebody walk me through how to read it?

For instance, I do not understand where the Mi and Mj elements come from (as they are not referenced in the write up)

Same for the ai / aj elements.

When reading mathematical formulas such as this, how am I supposed to know what they stand for if they are not explained anywhere in the text?

YuiTo Cheng
  • 4,705
Startec
  • 185
  • I'm guessing that $M_i$ and $M_j$ are the number of rows and number of columns in the kernel, and $a_i$ and $a_j$ are meant to account for the location of the anchor point in the kernel, but I don't know why there are subscript $i$s and $j$s in either case. The notation is not explained clearly. – littleO Feb 10 '19 at 06:01

0 Answers0