# How to Obtain Mathematically High Frequency and Low Frequency Component Separately Using Bilateral Filter?

I have asked this question before in the sense that what does a high frequency and low frequency component signify in a image and i got satisfactory answers now i want to know that how i can get high frequency and low frequency component separately from the image.

I mean what changes i have to make in the equations of bilateral filters and its implementation in matlab so that i can get both high frequency and low frequency component of that image.

Because in my experiment i need both the high frequency and low frequency component of a image.

Bilateral filters takes a weighted sum of the pixels in a local neighborhood; the weights depend on both the spatial distance and the intensity distance.

The value of a pixel assigned is given as

$$BF[I_p] = \frac{1}{W_p} \sum_{\substack{ q\in S }} G_{\sigma_s}(\parallel p-q \parallel) G_{\sigma_r}(\mid I_p - I_q\mid) I_q$$

Do I have to make changes to this equation of bilateral filter to get high frequency and low frequency components separately .

What component does this equation signify is it the high frequency component or low frequency component ?