ebook img

Programming cameras and pan-tilts with DirectX and Java PDF

287 Pages·2003·3.839 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Programming cameras and pan-tilts with DirectX and Java

Y L F M A E T Team-Fly® Programming Cameras and Pan-Tilts with DirectX and Java Programming Cameras and Pan-Tilts with DirectX and Java (cid:2) Ioannis Pavlidis, University of Houston Vassilios (cid:2) Morellas, Honeywell, Inc. Pete Roeber, Vital Images SeniorEditor TimCox PublishingServicesManager EdwardWade SeniorProductionEditor CheriPalmer EditorialCoordinator StaciePierce ProjectManagement DustyFriedman,TheBookCompany CoverDesign YvoRiezebosDesign CoverImage (cid:1)c NationalGeographic/gettyimages TextDesign LisaDevenish Illustration/Composition InteractiveCompositionCorporation Copyeditor JaneLoftus Proofreader MarthaGhent Indexer MickiTaylor Printer TheMaple-VailBookManufacturingGroup Designationsusedbycompaniestodistinguishtheirproductsareoftenclaimedastrademarks orregisteredtrademarks.InallinstancesinwhichMorganKaufmannPublishersisawareofa claim,theproductnamesappearininitialcapitalorallcapitalletters.Readers,however,should contacttheappropriatecompaniesformorecompleteinformationregardingtrademarksand registration. MorganKaufmannPublishers AnimprintofElsevierScience 340PineStreet,SixthFloor SanFrancisco,CA94104-3205 www.mkp.com ©2003byElsevierScience(USA) Allrightsreserved. PrintedintheUnitedStatesofAmerica 07 06 05 04 03 5 4 3 2 1 Nopartofthispublicationmaybereproduced,storedinaretrievalsystem,ortransmittedin anyformorbyanymeans—electronic,mechanical,photocopying,orotherwise—withoutthe priorwrittenpermissionofthepublisher. LibraryofCongressControlNumber:2002112509 ISBN:1-55860-756-0 Thisbookisprintedonacid-freepaper. To our families Praise for Programming Cameras and Pan-Tilts with DirectX and Java Thisbookwillbeaninvaluablesupplementaltextforanyimage processing/computervisioncoursebothattheundergraduateand graduatelevel.Iwouldalsoconsideritinlowerlevelundergraduate programmingcourses!Manyfacultymembers,includingmyself, withexpertiseincomputervisionhavestartedintegrating computervisionresearchresultsintocorecourseslikeData StructuresandAlgorithms.Therewillsoonbestrongindustry demandforcomputervisionscientistsandengineers—forpeople whounderstandvisiontechnologyandknowhowtoapplyit. —Dr.GeorgeBebis,Director,ComputerVisionLab, UniversityofNevada Thisbookisanexcellentsourcefortheamateurprogrammerand theprofessionaldeveloperalike.Itdemonstratesthefundamentals fordevelopingusefulapplicationsusingbothC++withDirectXand JavawithJMF,anditcollectsallofthecriticalinformationinone place. —JonathanDowdall,UniversityofNevada,Reno Icommendtheauthorsfortheeffortofprovidingtoolsand techniquesformanyuserswhoarestrugglingtoacquirean in-depthunderstandingofvideoprogramming.Thereisagrowing needforthistopic,butthereexistslimitedusefulinformationfor theaverageuserordeveloperwhomaynothaveenough knowledgeinthisparticularfield.Mostdocumentsareeithernot suitablefornoviceusersortheyaredifficulttofollow. —Dr.BirBhanu,ProfessorofEECSandDirector CenterforResearchinIntelligentSystems, UniversityofCaliforniaatRiverside Introduction................................................... 1 Ubiquitous Cameras and Computers - A Technological Revolution............................ 2 Interpersonal Communication.......................... 3 Entertainment................................................... 4 Security and Surveillance ................................ 4 Transportation.................................................. 5 Manufacturing Inspection................................. 6 Hardware Architecture................................ 6 Computer ......................................................... 8 Camera ............................................................ 8 Frame Grabber ................................................ 9 Expansion Bus................................................. 10 Software...................................................... 13 Summary .................................................... 13 The DirectShow Software Development Kit and the Component Object Model1..5....... Overview..................................................... 16 The COM .................................................... 18 COM Interfaces........................................... 20 COM Objects .............................................. 28 Our First DirectShow Application - Playing an AVI File ..................................... 30 How to Write a DirectShow Filter................ 31 Summary .................................................... 32 A Video Preview Application - Source and Render Filters3.3....................................... The GraphEdit Utility................................... 34 Building the Video Preview Filter Graph..... 34 The Property Pages of Filters..................... 39 The AVI Decompressor .............................. 41 Summary .................................................... 45 A Custom Filter for Video Processing4..7...... A Simple Change Detection Filter............... 48 Define and Instantiate Our Filter’s Class .... 50 Class Declaration............................................. 50 Filter Instantiation............................................. 54 Override the Appropriate Base Class Member Functions...................................... 58 The CheckInputType Member Function........... 58 The Transform Member Function .................... 60 The Differencing and Thresholding Operations ....................................................... 66 The Thresholding Algorithm............................. 69 Access Additional Interfaces....................... 74 Create the Property Page........................... 80 Create Registry Information........................ 92 Summary .................................................... 94 A Simple Video-Based Security Application9..7.................................................. Building the Application Shell ..................... 98 The Document-View Programming Architecture................................................. 102 The CCDAppApp Class.............................. 105 The CMainFrame Class.............................. 108 The CCDAppView Class............................. 111 Summary .................................................... 117 A Custom Filter for Pan-Tilt Manipulation1..19 Device Driver Categorization ...................... 120 Class CSearial: The Low-Level Serial Device Driver .............................................. 122 Reading and Writing Data into a Serial Port .... 126 Class CPanTiltDevice: The High-Level Driver .......................................................... 130 Opening and Closing a Pan-Tilt Communication Port ........................................ 131 Setting the Mode and Executing a Pan-Tilt Movement ........................................................ 132 The CPanTiltFilter Source Filter ................. 136 Developing the GUI through a Property Page................................................................. 136 The Pan-Tilt Interface ...................................... 143 Development of the Pan-Tilt Filter ................... 143 Running the UWan]iltGilter Using the \raphgdit Utility ............................................ 147 Summary .................................................... 149 A Custom Filter for Object Tracking1..5..1....... The Theory of Mean-Shift Algorithm........... 152 A Practical Implementation of the Mean- Shift Algorithm ............................................ 154 The Color Histogram Distribution of the Target Model.................................................... 154 The Color Histogram Distribution of the Target Candidate............................................. 155 Object Tracking via Maximization of Color Histogram Matching......................................... 156 The Mean-Shift Tracking Algorithm ............ 157 The Color Histogram CColorHistogramIndex Class ..................... 158 The CModel Parameters Class................... 160 Implementation of the Mean-Shift Object- Tracking Filter............................................. 161 The IPTTrackingInterface of the Tracking Filter................................................................. 161 The Structure of the CPTTrackingFilter Class................................................................ 162

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.