Upload
assignmentpedia
View
175
Download
20
Embed Size (px)
Citation preview
IMAGE PROCESSING (SAMPLE ASSIGNMENT)
Our online Tutors are available 24*7 to provide Help with Help with Image
processing Homework/Assignment or a long term Graduate/Undergraduate Help
with Image processing Project. Our Tutors being experienced and proficient in Help
with Image processing ensure to provide high quality Help with Image processing
Homework Help. Upload your Help with Image processing Assignment at ‘Submit
Your Assignment’ button or email it to . You
can use our ‘Live Chat’ option to schedule an Online Tutoring session with our
Help with Image processing Tutors.
IMAGE PROCESSING TOOL
This sample assignment shows image processing tool which consist opening and closing.
closing.m
clc; clear all; close all; z=uigetfile('*.*','Select an image file'); a=imread(z); % b=isrgb(a); % if( b==1) a=rgb2gray(a); % end s=[255 255 255 ; 255 255 255 ; 255 255 255]; r=size(a,1); c=size(a,2); for i=2:r-1 for j=2:c-1 if (a(i-1,j-1)==s(1) || a(i-1,j)==s(2) || a(i-1,j+1)==s(3) || a(i,j-1)==s(4) || a(i,j)==s(5) || a(i,j+1)==s(6) || a(i+1,j-1)==s(7) || a(i+1,j)==s(8) || a(i+1,j+1)==s(9)) new(i,j)=255; else new(i,j)=0; end end end r=size(new,1); c=size(new,2);
for i=2:r-1 for j=2:c-1 if (new(i-1,j-1)==s(1) && new(i-1,j)==s(2) && new(i-1,j+1)==s(3) && new(i,j-1)==s(4) && new(i,j)==s(5) && new(i,j+1)==s(6) && new(i+1,j-1)==s(7) && new(i+1,j)==s(8) && new(i+1,j+1)==s(9)) new1(i,j)=255; else new1(i,j)=0; end end end subplot(121) imshow(a); title('Original Image'); subplot(122) imshow(new1); title('Resultant Image');
visit us at www.assignmentpedia.com or email us at [email protected] or call us at +1 520 8371215