Understanding the Parameters of the Bilateral Filter
A small discussion of the details you've asked for:


The bilateral ﬁlter is controlled by two parameters: $\sigma$d and $\sigma$r.


• As the range parameter $\sigma$r increases, the bilateral ﬁlter becomes closer to Gaussian blur because the range Gaussian is ﬂatter i.e., almost a constant over the intensity interval covered by the image.

• Increasing the spatial parameter $\sigma$d smooths larger features.

An important characteristic of bilateral ﬁltering is that the weights are multiplied, which
implies that as soon as one of the weight is close to 0, no smoothing occurs. As an example, a large spatial Gaussian coupled with narrow range Gaussian achieves a limited smoothing although the ﬁlter has large spatial extent. The range weight enforces a strict preservation of the contours.

"The Norm or the double bars indicate the gaussian distance in the equation.This distance is deﬁned by Gσ(||p − q||), where σ is a parameter deﬁning the extension of the neighborhood."

Since (i,j) and (k,l) are simply spatial points on an image, they will vary from the start of the image to the end of the image. Typically this would be dependent on your indexing measure, for example in a matrix, you've have to range from 0 to 5 for a 5x5 image. The actual values of k,l matter little. Its the relative value which matters far more.