0% found this document useful (0 votes)
11 views2 pages

Experiment No. - 1: DATE: 15/01/2016

The document describes Experiment 1 which aimed to load an image and perform basic image processing operations using MATLAB. It discusses image processing and digital image processing theory. The MATLAB code loads the cameraman image, displays it, resizes it, crops it, adjusts the contrast, and adds salt and pepper noise and speckle noise. The results demonstrate that basic image processing operations were successfully performed on the image using MATLAB functions.

Uploaded by

Prem Prakash
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

Experiment No. - 1: DATE: 15/01/2016

The document describes Experiment 1 which aimed to load an image and perform basic image processing operations using MATLAB. It discusses image processing and digital image processing theory. The MATLAB code loads the cameraman image, displays it, resizes it, crops it, adjusts the contrast, and adds salt and pepper noise and speckle noise. The results demonstrate that basic image processing operations were successfully performed on the image using MATLAB functions.

Uploaded by

Prem Prakash
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

DATE: 15/01/2016

EXPERIMENT NO. 1

AIM: To load an image and perform basic image processing operations on


it.
SOFTWARE USED: MATLAB
THEORY:
Image processing is processing of images using mathematical
operations by using any form of signal processing for which the input is an
image, a series of images, or a video, such as a photograph or video
frame; the output of image processing may be either an image or a set of
characteristics or parameters related to the image.
Digital image processing is the use of computer algorithms to
perform image processing on digital images. As a subcategory or field
of digital signal processing, digital image processing has many
advantages over analog image processing. It allows a much wider range
of algorithms to be applied to the input data and can avoid problems such
as the build-up of noise and signal distortion during processing. Since
images are defined over two dimensions (perhaps more) digital image
processing may be model in the form of multidimensional systems.
The MATLAB functions used: imread, imshow, imresize, imcrop, imnoise.
MATLAB CODE:
clc;
close all;
clear all;
%Read an image
A = imread('cameraman.tif');
%Display an image
subplot(2,3,1);
imshow(A);
%Resizing of an image
B = imresize(A, [256 512]);
subplot(2,3,2);
imshow(B);
%Cropping of an image
C = imcrop(A, [75 68 130 112]);
subplot(2,3,3);
imshow(C);
%Changing Contrast of an image
1

for i = 1:length(A)
for j = 1:length(A)
if(A(i,j)<64)
D(i,j) = 0;
else D(i,j) = 64;
end
if(A(i,j)>128)
D(i,j) = 255;
end
end
end
subplot(2,3,4);
imshow(D);
%image noise-salt & pepper
E = imnoise(A,'salt & pepper');
subplot(2,3,5);
imshow(E);
%speckle noise
F = imnoise(A,'speckle');
subplot(2,3,6);
imshow(F);
RESULT:
cameraman.tif

image crop
image resize

image contrast

salt & pepper noise

speckle noise

CONCLUSION:
An image was read and basic image processing operations were
performed using MATLAB built in functions and results were verified.

You might also like