- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hallo, I am newbie here. So please help me
I found this code in ippiman.pdf (P.606). Does anyone know how to make it complete and run with Microsoft Visual Studio 2005?
And I also have some questions:
1. In line 2, what do 64 and {0}mean?
2. In line 5 (src[0] = -3; src[9] = 1;), why do we take these values? Are these random values?
3. In this value 8*sizeof(IPP32f), what does 8 mean, does it mean 2^3???
IppStatus fft( void ) {
Ipp32f src[64] = {0}, dst[64];
IppiFFTSpec_R_32f *spec;
IppStatus status;
src[0] = -3; src[9] = 1;
ippiFFTInitAlloc_R_32f( &spec, 3, 3, IPP_FFT_DIV_INV_BY_N,
ippAlgHintAccurate );
status = ippiFFTFwd_RToPack_32f_C1R( src, 8*sizeof(Ipp32f), dst,
8*sizeof(Ipp32f), spec, 0 );
ippiFFTFree_R_32f( spec );
return status;
}
Thank you very much for helping.
Anh
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Anh,
this sample demonstrates how to do FFT for 8x8 image with Ipp32f data. So, for source and destination arrays you need buffer with length of 64 Ipp32f elements. Source array was initialized with zero and to obtain non zero output, random choosen elements of source array were initilaized with somewhat non zero values (arbitrary for the demonstration goal). Function ippiFFTFwd_.. work with 2D array, so it need to know step paramater (which specifies number of bytes between two adjacent image rows). For that particular case step (number of bytes between adjacent rows) is 8*sizeof(Ipp32f).
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vladimir,
Thank you for your helping, I think that now it is a little bit clearer for me.
Regards
Anh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have another question , if I want to proceed 1 image 2*4,is this function correct? Can someone explain for me in detail what does "specifies number of bytes between two adjacent image rows" mean?
status2D = ippiFFTFwd_RToPack_8u32s_C1RSfs( src, 2*sizeof(Ipp8u), dst, 4*sizeof(Ipp32s), spec, 0, pBuffer );
When I use the function above, I think I get the wrong result, but when I change to this
status2D = ippiFFTFwd_RToPack_8u32s_C1RSfs( src, 2*sizeof(Ipp8u), dst, 2*sizeof(Ipp32s), spec, 0, pBuffer );
It seems that it works correctly, so now I am confused by the phrase "specifies number of bytes between two adjacent image rows"
Thanks in advance
Anh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ahn,
I recommend you to start from IPP image processing manual, where IPP image concept is described.
Regards,
Vladimir
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page