3
$\begingroup$

The following is the 2d complex sinusoidal function,

enter image description here

$u_0$ and $v_0$ represent Fundamental Frequencies in $X$ and $Y$ directions respectively.

How can I represent $j$ (imaginary number)?

Edit:

here is my use-case: ... ... I need to implement Gabor Filter using both spatial and frequency domain equations. In the link ... http://www.cs.utah.edu/~arul/report/node13.html ..., you can see that there are several equations. (14) is the equation of Gabor Filter in spatial domain. (15) is the equation of Gabor Filter in frequency domain. Hence, my question.

$\endgroup$
2
  • $\begingroup$ Your second question isn't something anyone else can answer. It's like asking, "I want to plot 'sin(ωx);', what should 'ω' be?" It depends on what you're trying to accomplish. You can set it to 1 to see what it looks like, and then try other values. Or, if you have a specific use-case in mind, explain that, and then maybe we can help you. $\endgroup$ – user1118321 Sep 17 '16 at 16:28
  • $\begingroup$ @user1118321, Thank you very much for your response. OK. here is my use-case: ... ... I need to implement Gabor Filter using both spatial and frequency domain equations. In the link ... cs.utah.edu/~arul/report/node13.html ..., you can see that there are several equations. (14) is the equation of Gabor Filter in spatial domain. (15) is the equation of Gabor Filter in frequency domain. Hence, my question. $\endgroup$ – user464 Sep 17 '16 at 16:41
3
$\begingroup$

One way to represent a complex-valued function in a bitmap is to use one color channel for the real component and one for the imaginary component. For example, rendering a complex plane wave (your equation) with R = real, G = imaginary looks like this (click for shadertoy):

complex plane wave

$\endgroup$
2
  • $\begingroup$ Just a beginner question, so sorry in advance. Is what you explained equivalent to taking real component as x-axis and imaginary as y-axis ? if not, then can we also do that to represent a complex function ? $\endgroup$ – A---B Sep 17 '16 at 17:47
  • $\begingroup$ @A---B The input to the function is the position on screen, with x = real, y = imaginary. The output is the color, with red = real, green = imaginary. $\endgroup$ – Nathan Reed Sep 17 '16 at 20:52

Your Answer

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