<p>Is it possible to create a single kernel which can help us to perform an 2 step image processing? </p>

<p>For example, I want to first perform a median filter on my image to remove salt and pepper noise and then perform a sharpen operation on it. </p>

<p>For this purpose, I have to perform the following operation </p>

<pre><code>(image * Median_Kernel) *  sharpening kernel = final_image
</code></pre>

<p><strong>I want to have a kernel which combines the effect of Median_kernel and sharpening it such that</strong> </p>

<pre><code>image * combined_kernel = final_image
</code></pre>

<p>Is this mathematically possible? If so, could someone please explain to me how to do this mathematically?</p>

CC BY-SA 3.0
2017-10-10T15:27:06.027Z
Yes if each kernel is just a convolution. Sharpening algorithms may or may not be, median also usually is not. Read [this](https://math.stackexchange.com/questions/1023984/combining-two-convolution-kernels)
joojaa
CC BY-SA 3.0
2017-10-11T18:05:31.253Z
It might depend on the actual *kernel*. Can you include the specific kernels you're talking about in the question?
Christian Rau
<image-processing>
How can I combine two filter kernels for image processing to create a single kernel?
Varun Vijaykumar
# How can I combine two filter kernels for image processing to create a single kernel?

(Asked by: username_0 on 2017-10-10)

Is it possible to create a single kernel which can help us to perform an 2 step image processing?

For example, I want to first perform a median filter on my image to remove salt and pepper noise and then perform a sharpen operation on it.

For this purpose, I have to perform the following operation

```
(image * Median_Kernel) *  sharpening kernel = final_image

```

**I want to have a kernel which combines the effect of Median\_kernel and sharpening it such that**

```
image * combined_kernel = final_image

```

Is this mathematically possible? If so, could someone please explain to me how to do this mathematically?

**Tags:** image-processing

> **Comments:**
> **username_1**: Yes if each kernel is just a convolution. Sharpening algorithms may or may not be, median also usually is not. Read [this](https://math.stackexchange.com/questions/1023984/combining-two-convolution-kernels)  
> **username_2**: It might depend on the actual *kernel*. Can you include the specific kernels you're talking about in the question?  

---

## 0 answers

