15.6. THECOMPAREOPERATOR
239
miserablyasatexturesegmentationoperator. Thecompareoperatorinthe
nextsectionoerssomehope.
Figure15.14:TheFailedResultofApplyingtheHurstOperatortotheHouse
Image
15.6 TheCompareOperator
Analtextureoperatorusesthecommonsenseapproachofcomparingone
texturein the imageagainstalltextures. . Select t asmallareainanimage
that containsone sampletexture (suchas thebrick textureinleft halfof
Figure15.14). Movethis s smalltextureareathroughtheentire image. . At
eachpixel,subtracttheimagefromthesampletextureandusetheaverage
dierenceastheoutput.Ifthetextureintheimageissimilartothesample
texture,theoutputwillbesmall.Ifthetextureintheimageisdierentfrom
thesampletexture,theoutputwillbelarge.
Listing15.1endsbyshowingthesourcecodethatimplementsthecompare
operator.Therstpartofcomparemallocsthesmallarraytoholdthesample
texture.Next,itcopiesthepartoftheinputimagethatcontainsthesample
textureintothesmallarray. Themainloopofcomparesums s theabsolute
valueofthedierencebetweenthesmallarray andtheinput image. . The
outputissettothesum(big)dividedbythearea(size*size).
Figure15.15showsanexampleofthecompareoperator.Theupperleft
quartershowstheinputimagecomprisingthetightlywoventexturenextto
thestrawtexture.Theupperrightquartershowstheresultoftakinga3x3
Change pdf to ppt - C# Create PDF from PowerPoint Library to convert pptx, ppt to PDF in C#.net, ASP.NET MVC, WinForms, WPF
Online C# Tutorial for Creating PDF from Microsoft PowerPoint Presentation
convert pdf to powerpoint online no email; convert pdf file to ppt online
Change pdf to ppt - VB.NET Create PDF from PowerPoint Library to convert pptx, ppt to PDF in vb.net, ASP.NET MVC, WinForms, WPF
VB.NET Tutorial for Export PDF file from Microsoft Office PowerPoint
pdf to powerpoint converter; export pdf to powerpoint
240
CHAPTER15. BASICTEXTURESOPERATIONS
areaofthewoventextureandcomparingittotheinputimage. Theresult
isdarkanddiculttosee. Thelower r rightquartershowstheoutcomeof
performinghistogramequalizationonthedarkresult.Nowwecanclearlysee
howthestrawareaproducedabrighteroutput.Thismeansthatthetexture
inthestrawareaisnotsimilartothesampletexturetakenfromthetightly
woven area. . The e lower left quarter r shows the e segmentation n result. . The
compareoperatorsuccessfully produceddierentgray levelsto distinguish
twotextures.
Figure15.15:TheResultofApplyingtheCompareOperatortoaTexture
Figure15.16showsanotherexampleofthecompareoperator. Thisex-
ampleillustratesboththepowerandtheweaknessofthecompareoperator.
Theleft halfofFigure15.16showsthehouseimage. . Therighthalfshows
theresultoftakinga5x5areaofthebricktextureandcomparingitwiththe
houseimage. Theareascorrespondingbricksarethedarkestbecausetheir
texture matchesthesample brick area. . The e compareoperatordidagood
jobofseparatingthebricksfromtheothertextures. Notetheweaknessof
thecompareoperator.Itlumpedalltheothertextures(roof,trees,windows,
shutters)intoonecategory.Thecompareoperatorcanonlyndonetexture
inanimage.
Online Convert PowerPoint to PDF file. Best free online export
Creating a PDF from PPTX/PPT has never been so easy! Web Security. Your PDF and PPTX/PPT files will be deleted from our servers an hour after the conversion.
converting pdf to ppt; convert pdf into ppt online
How to C#: Convert PDF, Excel, PPT to Word
Convert Jpeg to PDF; Merge PDF Files; Split PDF Document; Remove Password from PDF; Change PDF Permission Settings. How to C#: Convert PDF, Excel, PPT to Word.
how to convert pdf into powerpoint on; converting pdf to powerpoint slides
15.7. ANAPPLICATIONPROGRAM
241
Figure15.16: TheResultofApplyingtheCompareOperatortotheHouse
Image
15.7 AnApplicationProgram
Listing15.2showsanapplicationprogramthatusesthetextureoperators
withentireimageles. It t hasthesameformastheotherapplicationpro-
gramspresentedinthistext.
15.8 Conclusions
Thischapterdescribedtexturesandseveraloperatorsthathelpdistinguish
textures. Wedonothaveagooddenitionoftextureandanyuniversally
applicable texture e operators. . The e operators presented here work k well l in
certainsituations. Experiment t with them andexperiment withthe other
pre-processingandpost-processingoperatorsfromtheseries.
15.9 References
15.1\TheImageProcessingHandbook,ThirdEdition,"JohnC.Russ,CRC
Press,1999.
15.2\NumericalRecipesinC,"Press,WilliamH,BrianP.Flannery,Saul
A.Teukolsky,WilliamT.Vetterling,CambridgeUniversityPress,1988.
15.3\VisioninManandMachine,"MartinD.Levine,McGraw-Hill,1985.
C# PDF Convert: How to Convert MS PPT to Adobe PDF Document
PDF; Merge PDF Files; Split PDF Document; Remove Password from PDF; Change PDF Permission Settings. C# PDF Convert: How to Convert MS PPT to Adobe PDF Document.
add pdf to powerpoint slide; image from pdf to powerpoint
How to C#: Convert Word, Excel and PPT to PDF
Convert Jpeg to PDF; Merge PDF Files; Split PDF Document; Remove Password from PDF; Change PDF Permission Settings. How to C#: Convert Word, Excel and PPT to PDF
how to add pdf to powerpoint; convert pdf into powerpoint online
242
CHAPTER15. BASICTEXTURESOPERATIONS
VB.NET PowerPoint: Process & Manipulate PPT (.pptx) Slide(s)
If you want to change the order of current processing control add-on can do PPT creating, loading powerful & profession imaging controls, PDF document, image to
how to change pdf to powerpoint; create powerpoint from pdf
C# TIFF: Learn to Convert MS Word, Excel, and PPT to TIFF Image
C# TIFF - Conversion from Word, Excel, PPT to TIFF. Learn How to Change MS Word, Excel, and PowerPoint to TIFF Image File in C#. Overview
images from pdf to powerpoint; pdf to ppt converter online
Chapter16
RandomDotStereograms
16.1 Introduction
Thischapterdescribesrandomdotstereogramsandprovidesthesourcecode
so you can make your own. . Stereograms s are e those strange e 3-D D pictures
youseeonbooks,calendars,andt-shirtseverywhere. Youfocuspastthem
and all the dots form what t appears to o be objects with surprising depth.
Givendierentnamesbydierentpeople,these3-Dpicturesareallsimilar
inappearanceandconstruction.Stereogramsareapartofimageprocessing
becausemakingastereograminvolvestakingprocessinganexistingimageit
togiveitanewappearance.
16.2 StereogramBasics
Let’srstdiscusswhystereogramslookthewaytheydo.Aneasywaytodo
thisiswithtextgures(we’llmoveontodotslater).Onekeytostereograms
isdivergent viewingor focusing onapointbehindtheimage. . Figure16.1
shows thatwhen two eyes (RI=right eye, , LI=lefteye) ) focus on apointx
behindthepicture,theyseetwodierentthings(LIseesaandRIseesb).
Thebrainmixesthesetwointoasingleimage.Stereogramsusethismixing
toproducedepthinthemind.
Figure16.2showsanotherbasicconceptinstereograms|therepeating
pattern.Thepattern1234567890runsfromlefttorightandrepeatsitselffor
thewidthoftheimage. Therepeatingpatternhasfourproperties.(1)The
patternrunshorizontally,soorientation mustbe correct(youcannotturn
243
VB.NET PowerPoint: Convert & Render PPT into PDF Document
VB.NET PowerPoint - Render PPT to PDF in VB.NET. What VB.NET demo code can I use for fast PPT (.pptx) to PDF conversion in .NET class application?
how to convert pdf file to powerpoint presentation; pdf to powerpoint conversion
VB.NET PowerPoint: Read & Scan Barcode Image from PPT Slide
VB.NET PPT PDF-417 barcode scanning SDK to detect PDF-417 barcode image from PowerPoint slide. VB.NET APIs to detect and decode
change pdf to powerpoint online; conversion of pdf to ppt online
244
CHAPTER16. RANDOMDOTSTEREOGRAMS
focus point
x
..
. .
picture
----------a----b--------------
.
.
.
.
.
.
.
.
LI
RI
Figure16.1:DivergentViewing
focus point
x
123456789012345678901234567890
LI
RI
Figure16.2:TheRepeatingPattern
theimage sideways). . (2)There e areaxedsetofelementsinthe pattern.
(3)Alltheelementsinthepatternarethesamesize(xedfontinthiscase).
(4) The widthofthepatternmust beless thanthedistancebetweenyour
eyes.Property(4)iscriticalwhenmakingastereogram’snaloutput.Most
people’seyesarealittlemorethananinchapart,sooneinchisagoodwidth
forarepeatingpattern.Displayscreensshow60-70dotsperinchwhilelaser
printersgive300dotsperinch. Thesetwooutputdevicesrequiredierent
patternwidths.
Figure16.3illustrateshowarepeatingpatternproducesdepth.Thetop
partofgure16.3showsthata’1’wasdeletedfrom thepattern. . Theleft
andright eyes,viewingtheimage divergently,arelookingattwodierent
16.2. STEREOGRAMBASICS
245
Deleted a a 1 from here
|
|
12345678902345678901234567890
so the brain adapts
1234567890
1
2345678901234567890
LI
RI
Figure16.3:DeletinganElementfromthePattern
placesontheimage. Therighteyeseesthe’1’inthepatternwhiletheleft
eyedoesnot(itwasdeleted),sothebrainadapts. Thebrainfeelsthatthe
’1’is present for theleft eye,so thebrain tucks the’1’ ’ behind the e ’2’on
theleft side. . This s brings the rightside oftheimagecloser andcreatesan
illusionofdepth.Shorteningthepatternbydeletinganelementbroughtthe
imageclosertotheviewer. Ifyouareviewingtheseimagesonascreen,use
theviewingsoftwaretoreduceorincreasethesizeoftheimagesforoptimal
viewing.
Figure16.4showshowtopushtheimageawayfromtheviewerbyinsert-
inganelementintothepattern.Thetoppartshowsthatan’A’wasinserted.
Therighteyeseesthe’A’,thelefteyedoesnot,sothebrainadapts. The
brainreasonsthatthelefteyedidnotseethe’A’becausethe’A’wastucked
behindthe’8’. Therightsideoftheimagebecomesfartheraway. . Length-
eningthepatternbyinsertinganelementpushedtheimageawayfromthe
viewer.
Figure16.5combinesdeletionandinsertiontopopanobjectoutofthe
246
CHAPTER16. RANDOMDOTSTEREOGRAMS
Inserted an n A A here
|
|
123456789012345678A901234567890
so the e brain n adapts
901234567890
A
123456789012345678
LI
RI
Figure16.4:InsertinganElementintothePattern
background. Thetoppartofthegureshowsthata’1’wasdeletedandan
’A’wasinserted. Thetwoeyesseedierentthings,sothebrainadaptsby
tuckingthe’1’behindthe’2’andtuckingthe’A’behindthe’8’.Thecenter
sectionappearsfartherawaythantheends(theobjectdropsbackintothe
background).
Shortening and lengthening the pattern by y 2, 3, 4, etc. . creates s other
depthlevels(2,3,4,etc.). Keepthelengthoftherepeatingpatternabout
twiceasbigasthenumberofdepthlevels.
Figure16.6putstheseconceptstogetherintoacharacterstereogramusing
therepeatingpattern0123456789.Onthefourthlinethepatternisshortened
by deletingan n ’8’andthenlengthened by y insertingan n ’A’.Whenviewed
divergently,youseearectanglepoppingoutofthecenteroftheimage.
Figure16.7showstheresultofthenalstepinarandomcharacterstere-
ogram. Theviewer r againsees arectanglepoppingoutofthebackground.
Figure16.7istheresultofalinebylinerandomcharactersubstitutionap-
pliedtogure16.6. Forexample,taketherstlineofgure6,substitutean
’R’foreach’0’,an’E’foreach’1’,andsoonusingthesubstitutionvalues
showningure16.8toproducetherstlineofgure16.7.Arandomnumber
16.2. STEREOGRAMBASICS
247
Deleted a a 1
Inserted an n A
|
|
|
|
12345678902345678A901234567890
so the brain adapts
1234567890
901234567890
1
A
2345678
LI
RI
Figure16.5:DeletingandInsertingtoCreateanObject
012345678901234567890123456789012345
012345678901234567890123456789012345
012345678901234567890123456789012345
0123456790123456790123456790A1234567
0123456790123456790123456790A1234567
0123456790123456790123456790A1234567
0123456790123456790123456790A1234567
0123456790123456790123456790A1234567
0123456790123456790123456790A1234567
0123456790123456790123456790A1234567
012345678901234567890123456789012345
012345678901234567890123456789012345
012345678901234567890123456789012345
012345678901234567890123456789012345
Figure16.6:ACharacterStereogram
248
CHAPTER16. RANDOMDOTSTEREOGRAMS
REPGGXRPNRREPGGXRPNRREPGGXRPNRREPGGX
BZCNFWLQIJBZCNFWLQIJBZCNFWLQIJBZCNFW
JBBHAWDYDCJBBHAWDYDCJBBHAWDYDCJBBHAW
WSJRXJHGZWSJRXJHGZWSJRXJHGZWYSJRXJHG
AJQKCKLZAAJQKCKLZAAJQKCKLZAAYJQKCKLZ
SSQCTYDTASSQCTYDTASSQCTYDTASMSQCTYDT
EDRWUDXZFEDRWUDXZFEDRWUDXZFEUDRWUDXZ
RIFSUQHCSRIFSUQHCSRIFSUQHCSRKIFSUQHC
HRWTFDUKFHRWTFDUKFHRWTFDUKFHFRWTFDUK
ZPDPYZKZVZPDPYZKZVZPDPYZKZVZBPDPYZKZ
ISFRFQGVPMISFRFQGVPMISFRFQGVPMISFRFQ
KLASOLWJXPKLASOLWJXPKLASOLWJXPKLASOL
WEAAFJEQIOWEAAFJEQIOWEAAFJEQIOWEAAFJ
WXFAIGAYRUWXFAIGAYRUWXFAIGAYRUWXFAIG
Figure16.7: ARandomCharacterStereogram
generatorcreatedthesesubstitutionvalues. Thetransitionfromgure16.6
to16.7usedadierentsetofsubstitutionvaluesforeachline.
Figure16.9showsanotherexample.Firstisthedepthimagewith0being
thebackgroundand2beingclosesttotheviewer. Thebottomistheresult
ofalinebylinerandomcharactersubstitution.
Nowwehavethebasicsofstereograms.Startwithadepthimagechoose
anappropriatepatternlength(lessthanthedistancebetweenyoureyesand
twiceasbigasthenumberofdepthlevels);shortenandlengthenthepattern
lengthaccordingtochanges indepth; ; andproduceastereogramwithline
by line random substitution. . We e also o know that we can make character
stereogramswhichareeasytoe-mail.
Extendingtheseconceptstodotsvicecharactersissimplewiththedif-
ferencebeing inthe randomsubstitution. . Dot t stereograms haveonly two
values (1and0forwhiteandblack). . Iftheoutputoftherandomnumber
generatorisodd,substitutea1andsubstitutea0otherwise. Ingure16.8
theGsubstitutesforbotha3anda4. Indotstereograms,a1willsubsti-
tuteforabouthalfthevaluesanda0willsubstitutefortheothers. Some
stereogramshavecoloreddots. Iftherearefourcolors,therandomnumber
ismodulusedby4(producing0,1,2,and3)withtheresultsubstitutingfor
thefourcolorvaluesinthepattern.
Documents you may be interested
Documents you may be interested