# nit uk histogram | Discrete Fourier Transform

View again

All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Information Report
Category:

## Documents

Published:

Views: 5 | Pages: 4

Share
Related documents
Description
nothing to say
Transcript
EXPERIMENT-08 AIM- To generates MATLAB code for histogram of an images using MATLAB command and also plot his image equivalent image. Theory  –   Histogram -  A histogram is a plot that lets you discover, and show, the underlying frequency distribution (shape) of a set of continues data. This allows the inspection of the data for its underlying distribution (e.g., normal distribution), outliers, skewness, etc.   A histogram is a graph. A graph that shows frequency of anything. Usually histograms have bars that represent frequency of occurring of data in the whole data set.  MATLAB CODE-   clc;   close all;   clear all;   i=imread('pout.tif');   a=histeq(i);   figure(2), imhist(a);   subplot(2,2,1), imshow(i),title('srcinal image')   subplot(2,2,2), imhist(i),title('hestogram image')   subplot(2,2,3), histeq(i),title('equivalent image')   subplot(2,2,4), imhist(a),title('histogram of equlizer image') RESULT- srcinal image050010001500hestogram image0 100 200equivalent image050010001500histogram of equlizer image0 100 200  EXPERIMENT-09 AIM- To generates MATLAB code for histogram of an image. MATLAB CODE-   clear all;   clc;   close all;   a=imread('pout.tif');   b=zeros(1,255);   [n,m]=size(a);   for x=1:n for y=1:m q=a(x,y);   b(q)=b(q)+1; end   end   subplot(1,2,1);   imshow(uint8(a));   title('Original Image');   subplot(1,2,2);   bar(b);   title('Histogarm of image');   RESULT- Original Image0 100 200 30005001000150020002500300035004000Histogarm of image  EXPERIMENT-10 AIM- To generates MATLAB code for 2d-DFT computing and visualization. Theory  –   Discrete Fourier transforms:   Working with the Fourier transform on a computer usually involves a form of the transform known as the discrete Fourier transform (DFT). A discrete transform is a transform whose input and output values are discrete samples, making it convenient for computer manipulation. There are two principal reasons for using this form of the transform:    The input and output of the DFT are both discrete, which makes it convenient for computer manipulations.    There is a fast algorithm for computing the DFT known as the fast Fourier transform (FFT). The DFT is usually defined for a discrete function  f  ( m , n ) that is nonzero only over the finite region 0 ≤ m ≤ M −1  and 0≤ n ≤ N −1 . The two-dimensional M -by- N  DFT and inverse M -by- N  DFT relationships are given by The values F  (  p , q ) are the DFT coefficients of  f  ( m , n ). The zero-frequency coefficient, F  (0,0), is often called the DC component. DC is an electrical engineering term that stands for direct current. (Note that matrix indices in MATLAB ®  always start at 1 rather than 0; therefore, the matrix elements  f  (1,1) and F  (1,1) correspond to the mathematical quantities  f  (0,0) and F  (0,0), respectively.)  MATLAB CODE-   %computing and visualing 2d -dft   clc;   clear all;   close all;   f=imread('blobs.png');   [a,b]=size(f);   f=double(f);   ff=fft2(f); % a finer sampling of the Fourier transform s=abs(ff);   figure(1); subplot(2,1,1); imshow(f); title('srcinal image')   subplot(2,1,2); plot(s); title('plot of abs dft')   s2=log(1+abs(ff)); % dft   fc=fftshift(s); % Shifted transform   s3=log(1+abs(fc)); %after shift dft   figure(2);subplot(1,2,1); imshow((s2),[ title('dft before shift')   subplot(1,2,2); imshow((s3),[ title('dft after shift')   colormap(jet);   figure(3);subplot(2,1,1), plot(fc),title('shifted transform'),colorbar;   subplot(2,1,2), plot(s3),title('log magnitude form'),colorbar;    RESULT- srcinal image050100150200250300050001000015000plot of abs dft050100150200250300050001000015000shifted transform 2040600501001502002503000510log magnitude form 204060
Recommended

7 pages

5 pages

10 pages

39 pages

12 pages

13 pages

19 pages

3 pages

4 pages

9 pages

7 pages

23 pages

2 pages

218 pages

30 pages

View more...