*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> complib/cprod2d (3)              
Title
Content
Arch
Section
 

Contents


cprod2d,zprod2d(3F)					   cprod2d,zprod2d(3F)


NAME    [Toc]    [Back]

     cprod2d, zprod2d -	Compute	the product of a 2D Fourier transforms with a
     2D	filter.

SYNOPSYS    [Toc]    [Back]

     Fortran :
     subroutine	cprod2d( n1,n2,array,lda,filter,ldf)
	  integer   n1,n2,lda,ldf
	  complex   array(lda,n2), filter(ldf,n2)

     subroutine	zprod2d( n1,n2,array,lda,filter,ldf)
	  integer   n1,n2,lda,ldf
	  double complex      array(lda,n2), filter(ldf,n2)


     C :
     #include <fft.h>
     int cprod2d(int n,	int p, complex *array, int lda,
		    complex *filter, int ldf);
     int zprod2d(int n,	int p, zomplex *array,int lda,
		    zomplex *filter, int ldf);

DESCRIPTION    [Toc]    [Back]

     cprod2d and zprod2d compute the product of	the Fourier transforms of 2D
     complex sequence (size N1xN2) with	the Fourier transform of 2D filter.
     Note, the product of the Fourier transforms of two	sequences is equal to
     the Fourier transform of their convolution.

PARAMETERS    [Toc]    [Back]

     N1	- Integer, the first dimension size of the 2D sequence.
     Unchanged on exit.

     N2	- Integer, the second dimension	size of	the 2D sequence.
     Unchanged on exit.

     ARRAY - Array containing the samples of the 2D sequence to	be
     transformed.
     On	input, the element {i,j} of the	sequence is stored as A(i,j) in
     Fortran , and A[i+j*lda] in C.
     On	exit, the array	is overwritten by its transform.  LDA Integer, array
     leading dimension:	increment between the samples of two consecutive subsequences
 (e.g between {i,j+1} and	{i,j} ).
     Unchanged on exit.

     FILTER - Array containing the Fourier Transform of	the 2D filter.
     Unchanged on exit.

     LDF - Integer, array leading dimension: increment between the first
     samples of	two consecutive	sub-sequence(e.g between {i,j+1} and {i,j} ).
     Unchanged on exit.



									Page 1






cprod2d,zprod2d(3F)					   cprod2d,zprod2d(3F)



Example	of Calling Sequence
     Given a complex 2D	input of size 1024x64.	We successively	apply a	Direct
     Fourier Transform,	the product with a filter transform, then an Inverse
     Fourier TransformElements
 of each sequence are stored with increment (stride)1, and	the
     offset between the	first element of two succesive sub-sequences (leading
     dimension)	is 2049.
     Fortran
	  complex array(0:2049-1,0:64-1), filter(0:2049-1,0:64-1),
		  coeff(1024+15	+ 64+15)
	  call cfft2di(	1024, coeff)
	  call cfft2d( -1, 1024, 64, array, 2049, coeff)
	  call cprod2d(	1024, 64, array, 2049 ,	filter,	2049)
	  call cfft2d(	1, 1024, 64, array, 2049, coeff)

     C
	  #include <fft.h>
	  complex array[64*2049], filter[64*2049], *coeff;
	  coeff	= cfft2di( 1024, 64, NULL);
	  cfft2d( -1, 1024, 64,	array, 2049, coeff);
	  cprod2d( 1024, 64, array, 2049, filter, 2049);
	  cfft2d( -1, 1024, 64,	array, 2049, coeff);

     NOTE : As the FFTs	are not	normalized, a successive direct, then inverse
     transform,	scales the original input by the size of the sequence. Rather
     than calling cscal2d or zscal2d to	scale back the result, this scaling
     factor could be directly applied to the filter transform, thus saving
     some extra	work.

SEE ALSO    [Toc]    [Back]

      
      
     fft, cfft2di, zfft2di, cfft2d, zfft2d, cscal2d, zscal2d


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
cprod3d IRIX Compute the product of a 3D Fourier transforms with a 3D filter.
sprod3du IRIX Compute the product of a 3D Fourier transforms with a 3D filter.
sprod1du IRIX Compute the product of a 1D Fourier transform with a 1D filter.
cprod1d IRIX Compute the product of a 1D Fourier transform with a 1D filter.
cprodm1d IRIX Compute the product of Multiple 1D Fourier transforms with Multiple 1D filters.
sprodm1du IRIX Compute the product of Multiple 1D Fourier transforms with Multiple 1D filters.
fft IRIX Fast Fourier Transforms
fft2du IRIX 2D, Real to Complex, Direct Fast Fourier Transforms.
csfft1du IRIX 1D, Complex to Real, Inverse Fast Fourier Transforms.
csfft3du IRIX 3D, Complex to Real, Inverse Fast Fourier Transforms.
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service