






















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Digital Image Processing - Lab Manual - Lab Programmes
Typology: Lab Reports
Limited-time offer
Uploaded on 07/21/2020
4.6
(5)3 documents
1 / 30
This page cannot be seen from the preview
Don't miss anything!
On special offer
To implement an image enhancement program using matlab.
ALGORITHM:
STEP1: Start -> My computer->Program files-> MATLAB->bin-> MATLAB.
STEP2: Open MATLAB and select new script. STEP3: Write the source code. STEP4: Copy the path of the image and paste it in the required line. STEP5: Save and run the program. STEP6: The image will be enhanced and displayed in different window. STEP7: Stop the process
I=imread('C:\Documents and Settings\Administrator.PCW11\Desktop\Winter.jpg'); j=imresize(I,0.3); figure imshow(I); title('original image') figure imshow(j); title('resized image')
To implement histogram equalization program using matlab.
ALGORITHM:
STEP1: Start -> My computer->Program files-> MATLAB->bin-
MATLAB. STEP2: Open MATLAB and select new script.
STEP3: Write the source code. STEP4: Copy the path of the image and paste it in the required line. STEP5: Save and run the program. STEP6: The image will produce the intensity range and displayed in different Window. STEP7: Stop the process.
A=imread('C:\Documents and Settings\Administrator.PCW11\Desktop\Winter.jpg'); A_gray=rgb2gray(A); imhist(A_gray); imhist(A_gray,128); imhist(A_gray,32); R=A(:,1,1); G=A(:,1,2); B=A(:,1,3); subplot(1,3,1),imhist(R),title(R); subplot(1,3,2),imhist(G),title(G); subplot(1,3,3),imhist(B),title(B);
To implement an image restoration program using matlab. ALGORITHM: STEP1: Start -> My computer->Program files-> MATLAB->bin-> MATLAB. STEP2: Open MATLAB and select new script. STEP3: Write the source code. STEP4: Copy the path of the image and paste it in the required line. STEP5: Save and run the program. STEP6: The image will be restored and displayed in different window. STEP7: Stop the process
I=im2double(imread('C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\images.jpg')); LEN=60; THETA=0; noise_var=0.001; est_nsr=noise_var/var(I(:)); PSF=fspecial('motion',LEN,THETA); wnr=deconvwnr(I,PSF,est_nsr); imshow(wnr);
To implement an image filtering program using matlab. ALGORITHM: STEP1: Start -> My computer->Program files-> MATLAB->bin-> MATLAB. STEP2: Open MATLAB and select new script. STEP3: Write the source code. STEP4: Copy the path of the image and paste it in the required line. STEP5: Save and run the program. STEP6: The original image will be filtered and displayed in different window. STEP7: Stop the process.
I=imread('C:\Documents and Settings\Administrator.PCW11\Desktop\Winter.jpg'); h=ones(5,5)/25; I2=imfilter(I,h); imshow(I); title('original image'); figure imshow(I2); title('filtered image')
To implement edge detection using operators- program using matlab.
ALGORITHM:
STEP1: Start -> My computer->Program files-> MATLAB->bin-> MATLAB. STEP2: Open MATLAB and select new script. STEP3: Write the source code. STEP4: Copy the path of the image and paste it in the required line. STEP5: Save and run the program. STEP6: The image will be detected and displayed in three different formats. STEP7: Stop the process.
i=imread('C:\Documents and Settings\Administrator.PCW11\Desktop\Winter.jpg'); I=rgb2gray(i); Bw1=edge(I,'prewitt'); Bw2=edge(I,'sobel'); Bw3=edge(I,'roberts'); subplot(2,2,1); imshow(I); title('original image'); subplot(2,2,2); imshow(Bw1); title('prewitt'); subplot(2,2,3); imshow(Bw2); title('sobel'); subplot(2,2,4); imshow(Bw3); title('roberts');
To implement an image compression program using matlab.
ALGORITHM:
STEP1: Start -> My computer->Program files-> MATLAB->bin-> MATLAB.
STEP2: Open MATLAB and select new script. STEP3: Write the source code. STEP4: Copy the path of the image and paste it in the required line. STEP5: Save and run the program. STEP6: The image will be compressed and displayed in different window. STEP7: Stop the process.
clear all; close all; input_image1=imread('C:\pictures\CARU9KLZ.jpg'); input_image=imnoise(input_image1,'speckle',.01); figure; imshow(input_image); n=input('enter the decomposition level='); [Lo_D,Hi_D,Lo_R,Hi_R] = wfilters('haar'); [c,s] = wavedec2(input_image,n,Lo_D,Hi_D); disp('the decomposition vector output is'); disp(c); [thr,nkeep] = wdcbm2(c,s,1.5,3*prod(s(1,:))); [Compressed_image,TREE,Comp_ratio,PERFL2] = wpdencmp(thr,'s',n,'haar','threshold',5,1); disp('Compression ratio in %'); disp(Comp_ratio); re_ima1 = waverec2(c,s,'haar'); re_ima = uint8(re_ima1); subplot(1,3,1); imshow(input_image); title('I/P image'); subplot(1,3,2); imshow(Compressed_image); title('Compressed_image'); subplot(1,3,3); imshow(re_ima); title('reconstructed image');