You are on page 1of 6

11/20/2015

ImageDilationwithoutusing'imdilate'function|IMAGEPROCESSING

Emailaddress...

HOME

Submit

TABLEOFCONTENTS

ABOUTME

CONTACTME

PAIDPROJECTS

IMAGEPROCESSING
LetsLearntogether...HappyReading

GRABYOURFREE
GIFTTODAY

"Tworoadsdivergedinawood,andI,
Itooktheonelesstraveledby,
Andthathasmadeallthedifference"RobertFrost

RecentPosts
UPSAMPLINGINMATLAB
Upsamplingistheprocessofinsertingzerosinbetweenthesignalvalueinordertoincreasethesizeofthematrix.
Wewilldiscussabout...
More
UPSAMPLINGINFREQUENCYDOMAIN
1.UpsamplinginSpatialDomain1.1UpsamplingusingMATLABbuiltinfunction1.2Upsamplingin1D
1.3Upsamplingin2Dorimage...

ImageProcessing
6,321likes

LikePage

1friendlikesthis

More
CONVOLUTIONINMATLAB
LetustrytounderstandconvolutionbyperformingspatialaveragingonamatrixwithoutusingMATLAB
builtinfunction...
More

ImageDilationwithoutusing'imdilate'function
InMATLAB,imdilateisthefunctionthatdilatestheimageusingastructuringelement.Lets
learnhowthisfunctionworksusingsomeexamplesandcodes.

LIKE"IMAGE
PROCESSING"
Supportthisblogbyleaving
yourvaluablecommentsanda
likeonFacebookFanPage.
THANKSFORREADING

ADDME
IMAGE PROCESSING
Follow
+ 365

http://angeljohnsy.blogspot.com/2012/09/imagedilationwithoutusingimdilate.html

1/6

11/20/2015

ImageDilationwithoutusing'imdilate'function|IMAGEPROCESSING

Image
Processing
Blog Survey
Got a minute? Participate in this
survey to improve the blog!
* Required

Would you recommend Image


Processing blog to your friends
and Acquaintances?
No
Yes

How did you come to know


about Image Processing blog?
Facebook
Google+
Twitter
Search Engine
Friends

Are you a regular visitor of


Image Processing Blog?
Yes
No

Rate the Quality of blog content


*
1

Worst

5
Best

Any other opinions you would


like to share with me

Submit

ItsTotallyRandom
MATLABCODE:
Example1:
A=[10001101001110000111]
%Structuringelement
B=[100010001]
%Padzerosonallthesides
C=padarray(A,[11])
%IntializeamatrixofmatrixsizeAwithzeros
D=false(size(A))
http://angeljohnsy.blogspot.com/2012/09/imagedilationwithoutusingimdilate.html

SubscribeNow:
2/6

11/20/2015

ImageDilationwithoutusing'imdilate'function|IMAGEPROCESSING

fori=1:size(C,1)2
forj=1:size(C,2)2
%PerformlogicalANDoperation
D(i,j)=sum(sum(B&C(i:i+2,j:j+2)))
end
end

Subscribeinareader

display(D)

Example2:
A=imread('text.png')

YOUAREHERE

OriginalImage

A=im2bw(A)
%Structuringelement
B2=getnhood(strel('line',7,90))
m=floor(size(B2,1)/2)
n=floor(size(B2,2)/2)
%Padarrayonallthesides
C=padarray(A,[mn])
D=false(size(A))
fori=1:size(C,1)(2*m)
forj=1:size(C,2)(2*n)
Temp=C(i:i+(2*m),j:j+(2*n))
D(i,j)=max(max(Temp&B2))
http://angeljohnsy.blogspot.com/2012/09/imagedilationwithoutusingimdilate.html

3/6

11/20/2015

ImageDilationwithoutusing'imdilate'function|IMAGEPROCESSING

end
end

LiveTrafficFeed
AvisitorfromNewDelhi,Delhi
viewed"2DDiscreteCosine
Transform|IMAGE
PROCESSING"1minago
AvisitorfromBerlinviewed

figure,imshow(D)

"GaussianFilterwithoutusing
theMATLABbuilt_infunction|
IMAGEPROCESSING"3mins
AvisitorfromJaisalmer,
ago
Rajasthanviewed"SimpleGUI

DilatedImage

CalculatorinMATLAB|
IMAGEPROCESSING"5mins
AvisitorfromKharagpur,West
ago
Bengalviewed"Extractionof
Connectedcomponentswithout
usingBWLABELfunction|
IMAGEPROCESSING"6mins
AvisitorfromTbingen,
ago
BadenWurttembergviewed
"GaussianFilterwithoutusing
theMATLABbuilt_infunction|
IMAGEPROCESSING"7mins
AvisitorfromIslamabad
ago
viewed"FACEDETECTION
MATLABCODE|IMAGE
PROCESSING"9minsago
AvisitorfromAnkaraviewed
"Mean,Median,Variance,
StandarddeviationandMode|
IMAGEPROCESSING"9mins
AvisitorfromJapanviewed
ago
"ImageErosionwithoutusing

Example3:(Method2)
A=imread('text.png')
A=im2bw(A)
%Structuringelement
B=[1111111]
C=padarray(A,[03])
D=false(size(A))
fori=1:size(C,1)
forj=1:size(C,2)6
D(i,j)=sum(B&C(i,j:j+6))
end
end
figure,imshow(D)

MATLABfunction'imerode'|
IMAGEPROCESSING"9mins
AvisitorfromNrnberg,
ago
Bayernviewed"GaussianFilter
withoutusingtheMATLAB
built_infunction|IMAGE
AvisitorfromMangalore,
PROCESSING"10minsago
Karnatakaviewed"RGBImage
toGrayscaleImagewithout
usingrgb2grayfunction|
RealtimeviewGetFeedjit

TAGS

Removing
noise
Components
MATLAB

Image
GUI
in

Edge
detection Image Conversion
Photoshop
effects
in
MATLAB
MATLAB
BUILT_IN FUNCTIONS
Morphological
Image
Processing Array functions in
MATLAB Video Processing Files
Histogram equalization Image
Compression Object Identification
Optical illusion Shapes Templates
ImageArithmeticImageGeometry

Dilatedimage

http://angeljohnsy.blogspot.com/2012/09/imagedilationwithoutusingimdilate.html

Followers

4/6

11/20/2015

ImageDilationwithoutusing'imdilate'function|IMAGEPROCESSING
Jointhissite
withGoogleFriendConnect

Members(61) More

Alreadyamember?Signin

Youmightalsolike:

ImageErosion
withoutusing
MATLABfunction
'imerode'

ImageRotation
(Exampleswithout
imrotatefunction)

FindArea,
Perimeter,
Centroid,
Equivdiameter,
Roundness...
Linkwithin

Like"IMAGEPROCESSING"page
+2 Recommend this on Google

Labels:MorphologicalImageProcessing
YourReactions:

Useful (2)

Interesting (0)

Not bad (0)

:( (0)

4comments:
vishalsaid...
sir,thiserroriscoming....plzhelp..thnxinadvance..

???Assignmenthasmorenonsingletonrhsdimensionsthannonsingleton
subscripts
Errorin==>dilat10
D(i,j)=sum(B&C(i:i+6,j))
April26,2013at11:09PM
AMALITsaid...
howcangetlinkexplainbwareaopeninsameway.
October30,2013at3:09PM
SamSungsaid...
Doyouhavethec++codeforexample2?
November5,2013at5:20PM
Theosaid...
howaboutforgreylevelimages?
January11,2015at4:40AM

EnjoyedReading?ShareYourViews

http://angeljohnsy.blogspot.com/2012/09/imagedilationwithoutusingimdilate.html

5/6

11/20/2015

ImageDilationwithoutusing'imdilate'function|IMAGEPROCESSING

Enteryourcomment...

Commentas:

Publish

Unknown(Google)

Signout

Notifyme

Preview

Link

Today'sPopularPosts
FACEDETECTIONMATLABCODE
Letsseehowtodetectface,nose,mouthandeyesusingtheMATLABbuiltinclassand
function.Basedon...

Sobeledgedetection
Thegradientoftheimageiscalculatedforeachpixelpositionintheimage.Theprocedureandt...

Matlabcode:Histogramequalizationwithoutusinghisteqfunction
Itistheredistributionofgraylevelvaluesuniformly.Letsconsidera2dimensionalimagewhichhas
valuesrangin...

MATLABPROGRAM:2DMEDIANFILTERINGFORSALTANDPEPPERNOISEWITHOUTUSINGmedfilt2FUNCTION
MEDIANFILTER:IndigitalImageprocessing,removingthenoiseisoneofthepreprocessingtechniques.Theimagenoisemay
betermed...

BitPlaneSlicing
Digitally,animageisrepresentedintermsofpixels.Thesepixelscanbeexpressedfurtherintermsofbits.
Considert...

PoweredbyBlogger.

1450343

GooglepingHypersmash.com

http://angeljohnsy.blogspot.com/2012/09/imagedilationwithoutusingimdilate.html

6/6

You might also like