3
$\begingroup$

I have come across the following function and I'm trying to figure out what it really is. I have this function:

$f[x, y] = \delta [x + 2A, y - A] - \delta [x - A, y + A]$. The $\delta$ is representative of the dirac delta function. This function is used as input to some finite impulse response filter.

What does this function really mean? Is the first part of the function 0 everywhere except $-2A, A$ and the second part 0 everywhere except $A, -A$ ?

$\endgroup$
  • 1
    $\begingroup$ In an image represented as pixels in two dimensions, say as samples on a rectangular grid, this would be a positive impulse at $(-2A,A)$ and a negative impulse at $(A,-A)$. If your filter had impulse response $g(x,y)$, it would produce $g(x+2A,y-A)-g(x-A,y+A)$ when the input was $f(x,y)$. $\endgroup$ – Dilip Sarwate Feb 19 '12 at 22:41
  • $\begingroup$ @DilipSarwate Thanks for the comment. Would it really be those 2 separate calls to the impulse response? It is two separate dirac delta functions, but they are one function f(x,y). Having trouble understanding why that would be $\endgroup$ – Steve Feb 20 '12 at 0:04
  • $\begingroup$ It's a bit of an under-abstracted (and IMO not particularly good) notation you use there. In physics, we would write it like this: "$f(\mathbf{r}) = \delta(\mathbf{r}-\mathbf{r}'_1) - \delta(\mathbf{r}-\mathbf{r}'_2)$ with $\mathbf{r}'_1=(-2A,A),\mathbf{r}'_1=(A,-A)_{\mathbf{e}_x,\mathbf{e}_y}$" which I consider to make it much clearer that you're right with what's going on. $\endgroup$ – leftaroundabout Feb 20 '12 at 0:07
3
$\begingroup$

A (two-dimensional) finite-impulse-response filter has an impulse response $g(x,y)$ that is nonzero only for $(x,y)$ in a region of finite area (continuous parameters) of for a finite number of values of $x$ and $y$ (discrete parameter). For example, $g(x,y)$ might be nonzero only for points inside a circle of radius $r$. Specifically, consider $$g(x,y) = \begin{cases}1, &x^2 + y^2 \leq r^2,\\0, &\text{otherwise}\end{cases}$$ describes an image filter whose response to a point source (impulse function) at the origin is a disc of radius $r$ in the filtered image. For input $f(x,y) = \delta (x + 2A, y - A) - \delta (x - A, y + A)$, the filter output would be the sum of a positive disc centered at $(-2A,A)$ and a negative disc centered at $(A,-A)$ with cancellation occurring where the discs overlapped. (Disc ovrlap would be determined by the relationship between $A$ and $r$). More formally, $$g(x,y)\circledast f(x,y) = \begin{cases} 1, &(x+2A)^2 + (y-A)^2 \leq r^2, (x-A)^2+(y+A)^2 > r^2,\\ -1, &(x+2A)^2 + (y-A)^2 > r^2, (x-A)^2+(y+A)^2 \leq r^2,\\ 0, &\text{otherwise.}\end{cases}$$ where we have combined the outer darkness of $0$ with the $0$ produced by the cancellation of the discs in the region of overlap (if any).

Similar calculations can be done for the discrete case as well.

$\endgroup$
1
$\begingroup$

Adding an illustration here about the functions.

First i am showing how a 1D function $f(x) = \delta[x+2A] - \delta[x-A]$ looks like. enter image description here

Now below is the function you mentioned

enter image description here

$\endgroup$
  • $\begingroup$ -1 The illustration for 1D functions is wrong as is the illustration for 2D functions. The assertion that filtering with this kernel will result in the entire window being zero except - (2A col,-A row) and (-A col, A row) is also wrong. $\endgroup$ – Dilip Sarwate Feb 22 '12 at 20:23
  • $\begingroup$ @DilipSarwate - i didn't mean after filtering the image will become zero. I meant that if this is to be used as a kernel, the matrix to be operated on image will look like +1 & -1 in those places except those points. $\endgroup$ – Dipan Mehta Feb 22 '12 at 20:28
  • $\begingroup$ @DilipSarwate can you point me exact mistake in the illustration point. i will correct it. $\endgroup$ – Dipan Mehta Feb 22 '12 at 20:29
  • $\begingroup$ In the 1D case, $\delta(x+2A)$ is a (positive-valued) impulse at $x = -2A$, not at $x = +2A$ the way you have it. Similarly, $-\delta(x-A)$ is a (negative-valued) impulse at $x= A$, not at $x=-A$ the way you have it. This basic mis-interpretation carries over into the 2D case as well. I am unable to understand your clarification as to what you mean by filtering. What does "the matrix to be operated on image will look like +1 & -1 in those places except those points." mean? $\endgroup$ – Dilip Sarwate Feb 22 '12 at 20:41
  • $\begingroup$ Oh yes! I will correct this. About matrix : Basically in image processing you are applying filtering - the FIR impulse response is generally expressed as translated in the form of 3x3 or 5x5 window. That is what i meant by "matrix". Anyway - that i can see it is not adding clarity so i will remove that part. Thanks for pointing my mistake. $\endgroup$ – Dipan Mehta Feb 22 '12 at 20:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.