Questions tagged [kernel]

A kernel is a function that acts as a parameter that is passed to some algorithm. For example, the two dimensional Gaussian kernel is often used as a parameter for low pass filtering in image processing.

Filter by
Sorted by
Tagged with
0 votes
0 answers
17 views

Why do people use signs in columns/rows of several kernels reversed?

I have observed that different citations/codes use signs in different (reversed) columns/rows for many kernels. Here is an example for Prewitt (but same for Sobel, Scharr, etc); in some cases is ...
Fredrik's user avatar
  • 101
0 votes
0 answers
19 views

Why to use Sobel/Scharr kernels for image gradient computation?

I'm confused about image gradient computation mechanism in Python. I try to find gradient magnitude and orientation of a pixel. Here is my example image: ...
Fredrik's user avatar
  • 101
2 votes
1 answer
100 views

The Second Derivative of an Image Using the Sobel Filter

For computing the Harris corner detector, I want to calculate $I_{xy}$ and $I_{xy}$. Obtaining $I_x$ and $I_y$ are clear for me. But what about the second order derivatives? This and this and this one ...
hasanghaforian's user avatar
0 votes
1 answer
376 views

Laplacian Filter kernel size meaning

I'm using laplacian filter in opencv. I usually use laplacian filter with kernel size 3 which is default setting in opencv. I'm just curious what happen(intuitively) when I choose bigger size kernel? ...
Hyun Bin CHo's user avatar
0 votes
2 answers
154 views

Optimize FIR filter kernel in Matlab

I am currently using the firls function in Matlab to create my FIR filter kernel. This works well but I typically have to play with the filter order to get the gain to 1 and the shape to be somewhat ...
PrematureCorn's user avatar
0 votes
1 answer
36 views

Inverting the normalized Gaussian to get a kernel window radius

I am seeking to compute a kernel radius to use with my gaussian convolution filter, and inspired by https://stackoverflow.com/a/68050503/, I came up with: $$r=\sqrt{-2\sigma^2\ln\left( \epsilon\sigma\...
multiscale's user avatar
1 vote
2 answers
295 views

High pass or low pass kernel?

I am so confused about the high pass and low pass kernel. I saw some posts, and it says the sum of all coefficients is 0 is a high pass and if it is 1 is a low pass. And I think I did understand the ...
sss's user avatar
  • 23
4 votes
1 answer
317 views

Estimate the Convolution Kernel Based on the Original 2D Array and the Convolved 2D Array

I have two 2D arrays: $A$ is the original matrix that contains only 0s and 1s, and $B$ is the convolved matrix. I know the size of the convolution kernel $K$. Generally, it follows $B = A*K + S$, ...
learner_lyf's user avatar
4 votes
2 answers
73 views

Wider sharpening filter

The kernel of a sharpening filter of size 3x3 may look like $$ \frac{1}{4}\begin{bmatrix} 0 & 1 - \alpha & 0\\ 1 - \alpha & 4\alpha& 1 - \alpha\\ 0 & 1 - \alpha & 0 \end{...
user877329's user avatar
6 votes
1 answer
195 views

How to Find the Kernel of the Convolution for Linear Interpolation?

I'm trying to solve the following exercise: Image A was doubled by linear interpolation. The magnification was performed in two stages. In the first stage, add about zero pixel to the image between ...
vesii's user avatar
  • 293
5 votes
1 answer
2k views

Applying a 2D Convolution Using 2D FFT

So I was following the article Victor Podlozhnyuk (nVidia) - FFT Based 2D Convolution (Page 7). I have expanded the kernel to the correct way they have done it. However when it comes to the part on ...
Simon Balfe's user avatar
0 votes
0 answers
45 views

Is there any complex-valued function used to smooth signals?

To obtain a smoother signal, we usually convolve the original signal with a real-valued kernel function, such as Gaussian and Top-hat. Is there any complex-valued kernel function to smooth signals?
Wang Yun's user avatar
  • 124
7 votes
3 answers
839 views

Is there an adjective describing a filter with kernel that has zero mean?

A linear filter with a kernel that has zero mean could be thought of as a "DC-rejecting" filter. Is there a better or more commonly used adjective for such a filter?
Museful's user avatar
  • 193
3 votes
1 answer
721 views

kernel to calculate second order partial derivative of digital image

I'm working on image stacks, and I need to calculate second order partial derivatives of it. I already know how to calculate derivative on x and y axis, using Finite Cameron Taylor - Difference ...
tisseq's user avatar
  • 31
4 votes
1 answer
3k views

Is the Laplacian Filter an High Pass Filter (HPF)?

Is this kernel name as mean difference kernel or Laplacian filter? Is mean difference just a method?
Sun's user avatar
  • 43
2 votes
1 answer
1k views

Finding the equivalent filter H(u,v) in the frequency domain of a 3x3 spatial mask

I'm trying to find the equivalent frequency domain filter, $H(u,v)$, of a 3x3 spatial mask that averages all neighbours of a point $(x,y)$ in said 3x3 neighbourhood excluding the point itself. So far, ...
ButteredToast's user avatar
4 votes
1 answer
1k views

Applying 2D Image Convolution in Frequency Domain with Replicate Border Conditions in MATLAB

I have created a function that filters an image (250x250) with a gaussian blur kernel (5x5) using FFT and IFFT. I am trying to get my filtered image to equal exactly the filtered image created by the '...
Mr guy's user avatar
  • 85
1 vote
0 answers
144 views

Mean shift algorithm formula

I am watching a lecture on mean shift clustering. In the video, the mean shift vector is first defined and then it's relation to the gradient of a kernel density estimate is shown. The mean shift ...
calveeen's user avatar
  • 283
0 votes
0 answers
2k views

Having trouble calculating the correct Gaussian Kernel values from the Gaussian function formula

I'm having trouble calculating the same values for a Gaussian filter kernel as those derived in the Canny edge detector Wikipedia page It states: The equation for a Gaussian filter kernel of size (2k+...
Nevermore's user avatar
  • 101
0 votes
1 answer
352 views

Confusions regarding meaning of "kernel" in signal processing and image processing? [duplicate]

While studying filters in DSP and DIP, the term "kernel" is often encountered What is the meaning of "kernel" in context of filters??Please kindly explain in simple words with an example I have also ...
DSP_CS's user avatar
  • 1,850
0 votes
1 answer
1k views

How to chose a kernel function for a FIR low pass filter in audio processing?

As the answer of a previous question, I was suggested to use a FIR filter to act as a low-pass filter to reconstruct the envelope of a sound wave (edited, emphasis mine): As I said in a comment, ...
Sylvain Leroux's user avatar
0 votes
1 answer
295 views

Problem implementing KL expansion with square-exponential kernel: output just looks like Gaussian

I am trying to implement the Karhunen Loeve expansion for a 1-D Gaussian random field with a square-exponential kernel. Specifically, I know that a Gaussian process has a KL expansion $\hat{U}=\sum_{...
George's user avatar
  • 101
2 votes
2 answers
1k views

Why Are There Two Different Common $ 3 \times 3 $ Kernels for the Laplacian?

I find both of these 3x3 Laplacian kernels to be commonly used: 0 -1 0 -1 4 -1 0 -1 0 and: -1 -1 -1 -1 8 -1 -1 -1 -1 ...
hippietrail's user avatar
1 vote
3 answers
4k views

Why do convolution kernels such as Gaussian, Laplacian, LoG almost always seem to be expressed in integers?

I'm a total newb in search of some deeper understanding, but I'm not able to read the maths behind these on Wikipedia. If I understand correctly, you get the new value for each pixel by multiplying ...
hippietrail's user avatar
1 vote
0 answers
81 views

Difference in the meaning of kernel, filter, and dictionary atoms

While reading literature on wavelets, I have encountered keywords filters and dictionary atoms and their exact meaning is confusing for me. Basically, one can use them interchangeably and I won't see ...
Blade's user avatar
  • 111
0 votes
2 answers
262 views

What is the betwwen [i,j] and [u,v] in explinations of correlation and convolution (picture attached)?

I don't know how to write 'summation' symbol here hence posting the picture. Can someone explain to me the difference between i,j and u,v in this explanation of correlation and convolution? I know ...
Sulphur's user avatar
  • 189
3 votes
1 answer
2k views

Image Processing/ Computer Vision: How is separability of filters implemented?

I am trying to convince myself that a separable 2D filter can be implemented via two 1D filters. So, I took the example of following Sobel filter: $1/8\begin{bmatrix}-1&0&1\\-2&0&2\\-...
skr's user avatar
  • 283
0 votes
1 answer
486 views

What is the meaning of the sum of kernel components in digital image filtering?

When analyzing an image signal as a series of Dirac impulses in the continuous spatial domain, I applied continuous low pass filters (to reconstruct or smooth it) with area equal to 1 to preserve the ...
yggdrasil's user avatar
  • 115
4 votes
2 answers
1k views

What is the relation between kernel functions, kernels used in convolution and null spaces of a matrix?

I have recently started learning about machine learning and have come across kernels and null spaces. I understand that null space is the set of all vectors that satisfy the equation A.v = 0 (Where A ...
VaM999's user avatar
  • 141
3 votes
2 answers
2k views

What is a filter bank?

Suppose, I have 3 kernels: $$ \left[ \begin{array}{cc} a&b&c\\ d&e&f\\ g&h&i \end{array} \right] $$ $$ \left[ \begin{array}{cc} p&q&r\\ s&t&u\\ v&...
user avatar
0 votes
1 answer
881 views

Counting pixel connectivity groups

How many 4-connected and 8-connected components are present in the binary image below? Using definition of connectivities from the same textbook "A connected component is a group of pixels that are ...
mega_creamery's user avatar
4 votes
3 answers
439 views

How to correct phase of Diagonal Volterra kernels obtained with exponential sweep sine?

I'm trying to model a non-linear system using non-linear convolution with Novak's (2010) synchronized exponential sine weep (SESS) that models them with a Generalized Hammerstein (Volterra diagonal). ...
OldApprentice's user avatar
4 votes
3 answers
2k views

Volterra Kernel Convolution Method

Here I understand that the first term is a simple convolution of the input signal with first volterra kernel that I have acquired through farina sweep method, my question is if the second term is the ...
skyisfalling's user avatar
6 votes
1 answer
2k views

Why a Convolution Matrix Is Called a Kernel?

According to Wikipedia: In image processing, a kernel, convolution matrix, or mask is a small matrix. I am wondering, why the matrix is called a kernel? Does it has anything to do with kernel ...
bruin's user avatar
  • 213
4 votes
1 answer
1k views

The Kernel of the Guided Image Filter

I am trying to understand how to calculate kernel matrix for guided image filter. Following is the formula for kernel calculation. where k is window withing pixels i and j belong i assumed that ...
Tab's user avatar
  • 209
5 votes
2 answers
997 views

Using Convolution as Feature Extraction

I am now studying image processing in my spare time. My understanding of convolution is about 'response to a specific filter': When we have a raw image, or raw signal; and a filter, aka kernel; we ...
user152503's user avatar
6 votes
1 answer
2k views

Convolution of Two Kernels [OpenCV]

I've been completely stuck on a portion of my assignment for a few days now. After plenty of searching around, I have been unsuccessful in discovering information that leads me to the correct solution....
manapaws's user avatar
2 votes
1 answer
853 views

Fourier Transform of Kernel Density Estimation - Convolution Theorem?

I am reading this paper about density estimation (Appendix A), where the authors apply a Fourier transform to the estimated probability density (the $X_j$ are a sample of $N$ data points drawn ...
mSSM's user avatar
  • 123
2 votes
2 answers
944 views

What is the benefit of using symmetric kernel in Fourier transform?

In image processing, a forward transform of an $M\times N\text{-}$pixel image $f$ from spatial domain coordinates $(x, y)$ to transform domain coordinates $(u, v)$ can be defined as [1, p.12]: $$T(u,...
user avatar
5 votes
1 answer
1k views

2D Convolution in the Spatial Domain vs Frequency Domain [closed]

Suppose, I have this kernel. -1, -1, -1, -1, 9, -1, -1, -1, -1 Can this kernel be used in a FFT based convolution? How? What could be the reason of my failure? ...
user avatar
0 votes
1 answer
124 views

What should be done if the mask-values are too small?

According to the research paper Multidirectional Scratch Detection and Restoration in Digitized Old Images, we have, $$H(u, v) = \frac{1}{1 + 0.414 {. \sqrt[{2n}]{\frac {u^*}{D_u}+\frac {v^*}{D_v}}}} ...
user avatar
5 votes
2 answers
3k views

Laplacian Operator with and without Diagonal Direction Elements in the Kernel

This is a general question on the laplacian operator, which has two different versions. The first version is : \begin{matrix} 0 & 1 & 0 \\ 1 & -4 & 1 \\ 0 & 1 & 0 \end{...
kuku's user avatar
  • 273
4 votes
2 answers
7k views

When should the sum of all elements of a gaussian kernel be zero?

I found an approximation of a 5x5 2D convolution kernel like this : Here, the sum of the elements is zero and this one was used for Laplacian of Gaussian! Another one here : This one has all ...
Animesh Pandey's user avatar