开发者

How do I extract the real/imaginary part from FFT in Aforgenet?

开发者 https://www.devze.com 2023-04-01 23:50 出处:网络
I am having trouble figuring out extracting the real and imaginary parts from AForgenet FFT.I have the following

I am having trouble figuring out extracting the real and imaginary parts from AForgenet FFT. I have the following

ComplexImage cImage = ComplexImage.FromBitmap(inputImage);
cImage.ForwardFourierTransform();
Complex[,] realImaginaryData = cImage.Data;
开发者_如何学C

Does this mean I have manually extract real and imaginary parts from the complex structure?

Thanks. Any snippet would be great help!


I'm not that familiar with C#, but it seems as if cImage.Data returns a 2D array of Complex objects.

These objects each have public fields (see http://www.aforgenet.com/framework/docs/html/09bb06de-f1c8-fc26-3472-78a64c4f4ac6.htm) containing the real (Re field) and imaginary (Im field) parts.

So, I'd imagine:

double realPart = realImaginaryData[0,0].Re;
double imagPart = realImaginaryData[0,0].Im;
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号