User:Engrasimazizwaqasadv/sandbox

Use of Fourier transformation for Image compression & transformation in digital communication processing:

Abstract: In this advance era of technical age the use of communication technology is spreading everywhere in life. Either there may be high definition tv channels, satellite communication or internet technology with downloadable multimedia, the use of social media apps. these all are due to the advancement in digital communication. the core element along with audio processing image processing seems more important to this modern communication as any video element is composed of series of “Images” moving more than 60 frames/second.

Studied the given assignment

 * 1) Found two important subjects, image transformation & compression
 * 2) Expand the research material from ten related articles to further analyse the topic but keeping the core subject intact and central
 * 3) Add matlab codes for FFT Transformation
 * 4) This work is not a scholastic paper but just a summary of the said topic
 * 5) Focus on thses points like theory involves, mathematical formulas behind the FFT Image processing, transformation & Compression, Also lay down some applications of Image Compression, observation concluded lastly
 * 6) Book writing roadmap for the assigned topic "Image processing techniques  & comparative performance evaluation analysis "
 * 7) Summary of the  Article "Image Transformation & Compression using FFT"

Following key points have been observed :
	Image transformation using Fast Fourier transform is implemented everywhere in image processing application and likewise in embedded systems is more efficient

	For a large filter the Fourier transform allows us to isolate and process particular image frequencies and from low –pass and high pass with a great degree of precision.

	Only one disadvantage of Fourier transform is observed when the compression method is applied to the large size image (1024 x 1024) which is divided into block size of 32x32. In this case the reconstructed compressed image takes more space with respect to the original image.

	The DFT is the sampled Fourier Transform and therefore does not contain all frequencies forming an image, but only a set of samples which is large enough to fully describe the spatial domain image. The number of frequencies corresponds to the number of pixels in the spatial domain image, i.e. the image in the spatial and Fourier domain are of the same size.

	So Image quality can be controlled by DFT block selection.

	For a square image of size N×N, the two-dimensional DFT is given by: where f(a,b) is the image in the spatial domain and the exponential term is the basis function corresponding to each point F(k,l) in the Fourier space. The equation can be interpreted as: the value of each point F(k,l) is obtained by multiplying the spatial image with the corresponding base function and summing the result.

	The basic functions are sine and cosine waves with increasing frequencies, i.e. F(0,0) represents the DC-component of the image which corresponds to the average brightness and F(N-1,N-1) represents the highest frequency.

	where Using these two formulas, the spatial domain image is first transformed into an intermediate image using N one-dimensional Fourier Transforms. This intermediate image is then transformed into the final image, again using N one-dimensional Fourier Transforms. Expressing the two-dimensional Fourier Transform in terms of a series of 2N one-dimensional transforms decreases the number of required computations.

	Even with these computational savings, the ordinary one dimensional DFT has complexity. This can be reduced to if we employ the Fast Fourier Transform (FFT) to compute the one-dimensional DFTs. This is a significant improvement, in particular for large images. There are various forms of the FFT and most of them restrict the size of the input image that may be transformed. The mathematical details are well described in the literature. 	The Fourier Transform produces a complex number valued output image which can be displayed with two images, either with the real and imaginary part or with magnitude and phase. In image processing, often only the magnitude of the Fourier Transform is displayed, as it contains most of the information of the geometric structure of the spatial domain image. However, if we want to re-transform the Fourier image into the correct spatial domain after some processing in the frequency domain, we must make sure to preserve both magnitude and phase of the Fourier image.

	The Fourier domain image has a much greater range than the image in the spatial domain. Hence, to be sufficiently accurate, its values are usually calculated and stored in float values.

	The equations (4) and (5) are representing discrete Fourier transform (DFT) and inverse discrete Fourier transformation (IDFT) respectively. The use of an FFT vastly reduces the time needed to compute a DFT. The FFT method works recursively by dividing the original vector into two halves, computing the FFT of each half and then putting the results together.

Mathematical Notation of FFT for Image transformation & Compression respectively can be analyzed by following formulas:

The FFT of an image of size m X n is obtained in MATLAB by the function fft2. Above command Compute its Fourier transform And display the spectrum. This function returns a Fourier transform that is also of size m X n, with the data arranged in the form, origin of the data at the top left and with four quarter periods meeting at the centre of the frequency rectangle. The Fourier transform decomposes a signal into orthogonal trigonometric basis function. Using these equations, a signal can be transformed into the frequency domain and back again. The Fourier method is the most powerful technique signal analysis .it transforms the signal from one domain to another domain in which many characteristics of the signal are revealed. One usually refers to this transform domain as the spectral or frequency domain, while the domain of the original signal is usually the time or spatial domain.

Other Built-in Matlab Commands for Image Analysis: B = imtransform(A,tform) B = imtransform(A,tform,interp) B = imtransform(___,Name,Value) [B,xdata,ydata] = imtransform(___) load westconcordpoints Create a transformation structure for a projective transformation using the points. t_concord = cp2tform(movingPoints,fixedPoints,'projective'); Get the width and height of the orthophoto, perform the transformation, and view the result. info = imfinfo('westconcordorthophoto.png');

registered = imtransform(unregistered,t_concord,...   'XData',[1 info.Width],'YData',[1 info.Height]); imshow(registered) Apply a horizontal shear to a grayscale image. I = imread('cameraman.tif'); tform = maketform('affine',[1 0 0; .5 1 0; 0 0 1]); J = imtransform(I,tform); imshow(J)

Projective Transformation Map a square to a quadrilateral with a projective transformation. Set up an input coordinate system so that the input image fills the unit square with vertices (0 0), (1 0), (1 1), (0 1). I = imread('cameraman.tif'); udata = [0 1]; vdata = [0 1]; Transform to a quadrilateral with vertices (-4 2), (-8 3), (-3 -5), (6 3).

tform = maketform('projective',[ 0 0; 1  0;  1  1; 0 1],...                               [-4 2; -8 -3; -3 -5; 6 3]); Fill with gray and use bicubic interpolation. Make the output size the same as the input size.

[B,xdata,ydata] = imtransform(I,tform,'bicubic', ...                             'udata',udata,...                              'vdata',vdata,...                              'size',size(I),...                              'fill',128); subplot(1,2,1); imshow(I,'XData',udata,'YData',vdata) subplot(1,2,2); imshow(B,'XData',xdata,'YData',ydata)

'bilinear'   Linear interpolation 'nearest'    Nearest-neighbor interpolation—the output pixel is assigned the value of the pixel that the point falls within. No other pixels are considered

'bicubic'    Cubic interpolation resampler           structure returned by makeresampler. This option allows more control overhow imtransform performs resampling. resampler structure

B = imtransform(A,tform) transforms image A according to the 2-D spatial transformation defined by tform, and returns the transformed image, B. If A is a color image, then imtransform applies the same 2-D transformation to each color channel. Likewise, if A is a volume or image sequence with three or more dimensions, then imtransform applies the same 2-D transformation to all 2-D planes along the higher dimensions. For arbitrary-dimensional array transformations, use tformarray. B = imtransform(A,tform,interp) specifies the form of interpolation to use. B = imtransform(___,Name,Value) uses name-value pairs to control various aspects of the spatial transformation. example [B,xdata,ydata] = imtransform(___) also returns the extent of the output image B in the output X-Y space. By default, imtransform calculates xdata and ydata automatically so that B contains the entire transformed image A. However, you can override this automatic calculation by specifying values for the XData and YData name-value pair input arguments.

Image Processing Filter Analysis Matlab Code: %Code: clc clear all close all warning off x=imread('shankar.jpg'); imshow(x); for i=0.1:0.1:10 B = imgaussfilt(x,i); imshowpair(x,B,'montage'); drawnow; end

Guassian Filter Designing Using Matlab:

Image compression is a special subject of image processing

is the application of Data compression on digital images. In effect, the objective is to reduce redundancy of the image data in order to be able to store or transmit data in an efficient form. Image compression can be lossy or lossless. Lossless compression is sometimes preferred for artificial images such as technical drawings, icons or comics. This is because lossy compression methods, especially when used at low bit rates, introduce compression artifacts. Lossless compression methods may also be preferred for high value content, such as medical imagery or image scans made for archival purposes. Lossy methods are especially suitable for natural images such as photos in applications where minor (sometimes imperceptible) loss of fidelity is acceptable to achieve a substantial reduction in bit rate

More space required for certain image dimensions 1024*1024 The two dimensional Fourier transform (fft2) is computed for each block. The fft coefficients are quantized and transmitted then after the de-quantized of fft coefficients are computed. The two dimension inverse i.e. ifft2 of each block is computed and then puts the blocks back together into reconstructed images.

Further FFT Understanding:

Before the invent of Fourier transform until 1965 image processing was relying on analog filters which was neither efficient nor scalable. Image transformation was done by the analog filters to manipulate the image characteristics at sender & receiver side, of course which was not efficient as well as was involving tedious workout. the moment Fourier series invent there emerges so many algorithms for digital communication and thus for image processing, known as Discrete Fast Fourier Transforms

In mathematics, a Fourier transform (FT) is a mathematical transform that decomposes a function (often a function of time, or a signal) into its constituent frequencies, such as the expression of a musical chord in terms of the volumes and frequencies of its constituent notes. The term Fourier transform refers to both the frequency domain representation and the mathematical operation that associates the frequency domain representation to a function of time.

Digital images are now part of our daily life. People can hardly live without it. Therefore, digital image processing becomes more and more important these days. How to increase the resolution of images or reduce noises of images are always hot topics. Fourier Transformation can help us out. We can utilize Fourier Transformation to transform our image information - gray scaled pixels into frequencies and do further process of Quality Enhancement.

The process of Image compression algorithm flow is as following : 1.	Implement Fast Fourier Transformation to transform gray scaled image into frequency 2.	Visualize and Centralize zero-frequency component 3.	Apply low/high pass filter to filter frequencies 4.	Decentralize 5.	Implement inverse Fast Fourier Transformation to generate image data Let’s dive into each section to figure out the theory behind theses steps.

Applications • Photography and Printing • Satellite Image Processing • Medical Image Processing • Face detection, Feature detection, Face identification • Microscope image processing

.