A cookbook of algorithms for common image processing applications Thanks to advances in computer hardware and software, algorithms have been developed that support sophisticated image processing without requiring an extensive background in mathematics. This bestselling book has been fully updated with the newest of these, including 2D vision methods in content-based searches and the use of graphics cards as image processing computational aids. It’s an ideal reference for software engineers and developers, advanced programmers, graphics programmers, scientists, and other specialists who require highly specialized image processing. Algorithms now exist for a wide variety of sophisticated image processing applications required by software engineers and developers, advanced programmers, graphics programmers, scientists, and related specialists This bestselling book has been completely updated to include the latest algorithms, including 2D vision methods in content-based searches, details on modern classifier methods, and graphics cards used as image processing computational aids Saves hours of mathematical calculating by using distributed processing and GPU programming, and gives non-mathematicians the shortcuts needed to program relatively sophisticated applications. Algorithms for Image Processing and Computer Vision, 2nd Edition provides the tools to speed development of image processing applications. Shader Programming Basics......Page 3 Contents......Page 15 Preface......Page 23 Chapter 1 Practical Aspects of a Vision System — Image Display, Input/Output, and Library Calls......Page 27 The Basic OpenCV Code......Page 28 The IplImage Data Structure......Page 29 Reading and Writing Images......Page 32 An Example......Page 33 Image Capture......Page 36 Interfacing with the AIPCV Library......Page 40 References......Page 44 The Purpose of Edge Detection......Page 47 Traditional Approaches and Theory......Page 49 Models of Edges......Page 50 Noise......Page 52 Derivative Operators......Page 56 Template-Based Edge Detection......Page 62 Edge Models: The Marr-Hildreth Edge Detector......Page 65 The Canny Edge Detector......Page 68 The Shen-Castan (ISEF) Edge Detector......Page 74 A Comparison of Two Optimal Edge Detectors......Page 77 Color Edges......Page 79 Source Code for the Marr-Hildreth Edge Detector......Page 84 Source Code for the Canny Edge Detector......Page 88 Source Code for the Shen-Castan Edge Detector......Page 96 Website Files......Page 106 References......Page 108 Morphology Defined......Page 111 Connectedness......Page 112 Elements of Digital Morphology—Binary Operations......Page 113 Binary Dilation......Page 114 Implementing Binary Dilation......Page 118 Binary Erosion......Page 120 Implementation of Binary Erosion......Page 126 Opening and Closing......Page 127 MAX—A High-Level Programming Language for Morphology......Page 133 The ‘‘Hit-and-Miss’’ Transform......Page 139 Conditional Dilation......Page 142 Counting Regions......Page 145 Grey-Level Morphology......Page 147 Opening and Closing......Page 149 Smoothing......Page 152 Gradient......Page 154 Segmentation of Textures......Page 155 Size Distribution of Objects......Page 156 Color Morphology......Page 157 Website Files......Page 158 References......Page 161 Basics of Grey-Level Segmentation......Page 163 Using Edge Pixels......Page 165 Iterative Selection......Page 166 The Method of Grey-Level Histograms......Page 167 Using Entropy......Page 168 Fuzzy Sets......Page 172 Minimum Error Thresholding......Page 174 Sample Results From Single Threshold Selection......Page 175 The Use of Regional Thresholds......Page 177 Chow and Kaneko......Page 178 Modeling Illumination Using Edges......Page 182 Implementation and Results......Page 185 Comparisons......Page 186 Relaxation Methods......Page 187 Moving Averages......Page 193 Cluster-Based Thresholds......Page 196 Multiple Thresholds......Page 197 Website Files......Page 198 References......Page 199 Texture and Segmentation......Page 203 A Simple Analysis of Texture in Grey-Level Images......Page 205 Grey-Level Co-Occurrence......Page 208 Homogeneity......Page 211 Speeding Up the Texture Operators......Page 212 Edges and Texture......Page 214 Energy and Texture......Page 217 Vector Dispersion......Page 219 Surface Curvature......Page 221 Fractal Dimension......Page 224 Color Segmentation......Page 227 Website Files......Page 231 References......Page 232 What Is a Skeleton?......Page 235 The Medial Axis Transform......Page 236 Iterative Morphological Methods......Page 238 The Use of Contours......Page 247 Choi/Lam/Siu Algorithm......Page 250 Treating the Object as a Polygon......Page 252 Triangulation Methods......Page 253 Force-Based Thinning......Page 254 Definitions......Page 255 Use of a Force Field......Page 256 Subpixel Skeletons......Page 260 Source Code for Zhang-Suen/Stentiford/Holt Combined Algorithm......Page 261 Website Files......Page 272 References......Page 273 Image Degradations—The Real World......Page 277 The Frequency Domain......Page 279 The Fourier Transform......Page 280 The Fast Fourier Transform......Page 282 Two-Dimensional Fourier Transforms......Page 286 Fourier Transforms in OpenCV......Page 288 Creating Artificial Blur......Page 290 The Inverse Filter......Page 296 The Wiener Filter......Page 297 Structured Noise......Page 299 Motion Blur—A Special Case......Page 302 The Homomorphic Filter—Illumination......Page 303 Frequency Filters in General......Page 304 Isolating Illumination Effects......Page 306 Website Files......Page 307 References......Page 309 Objects, Patterns, and Statistics......Page 311 Features and Regions......Page 314 Training and Testing......Page 318 Variation: In-Class and Out-Class......Page 321 Minimum Distance Classifiers......Page 325 Distance Metrics......Page 326 Distances Between Features......Page 328 Cross Validation......Page 330 Support Vector Machines......Page 332 Merging Multiple Methods......Page 335 Merging Type 1 Responses......Page 336 Evaluation......Page 337 Converting Between Response Types......Page 338 Merging Type 2 Responses......Page 339 Bagging......Page 341 Boosting......Page 342 Website Files......Page 343 References......Page 344 The Problem......Page 347 OCR on Simple Perfect Images......Page 348 OCR on Scanned Images—Segmentation......Page 352 Noise......Page 353 Isolating Individual Glyphs......Page 355 Matching Templates......Page 359 Statistical Recognition......Page 363 OCR on Fax Images—Printed Characters......Page 365 Orientation—Skew Detection......Page 366 The Use of Edges......Page 371 Handprinted Characters......Page 374 Properties of the Character Outline......Page 375 Convex Deficiencies......Page 379 Vector Templates......Page 383 Neural Nets......Page 389 A Simple Neural Net......Page 390 A Backpropagation Net for Digit Recognition......Page 394 Merging Multiple Methods......Page 398 Printed Music Recognition—A Study......Page 401 Staff Lines......Page 402 Segmentation......Page 404 Music Symbol Recognition......Page 407 Source Code for Neural Net Recognition System......Page 409 Website Files......Page 416 References......Page 418 Searching Images......Page 421 Maintaining Collections of Images......Page 422 Color Image Features......Page 425 Color Quad Tree......Page 426 Hue and Intensity Histograms......Page 427 Comparing Histograms......Page 428 Requantization......Page 429 Results from Simple Color Features......Page 430 Other Color-Based Methods......Page 433 Grey-Level Image Features......Page 434 Edge Density—Boundaries Between Objects......Page 435 Boolean Edge Density......Page 436 Overall Regions......Page 437 Angular Regions......Page 438 Test of Spatial Sampling......Page 440 Additional Considerations......Page 443 Data Sets......Page 444 Website Files......Page 445 References......Page 446 Systems......Page 450 Chapter 11 High-Performance Computing for Vision and Image Processing......Page 451 Shared Memory......Page 452 Execution Timing......Page 453 Using clock()......Page 454 Using QueryPerformanceCounter......Page 456 Installing MPI......Page 458 Using MPI......Page 459 Inter-Process Communication......Page 460 Running MPI Programs......Page 462 Real Image Computations......Page 463 Using a Computer Network—Cluster Computing......Page 466 GLSL......Page 470 OpenGL Fundamentals......Page 471 Practical Textures in OpenGL......Page 474 Vertex and Fragment Shaders......Page 478 Required GLSL Initializations......Page 479 Reading and Converting the Image......Page 480 Passing Parameters to Shader Programs......Page 482 Putting It All Together......Page 483 Developing and Testing Shader Code......Page 485 Finding the Needed Software......Page 486 References......Page 487 Index......Page 491 Programmers, scientists, and engineers are always in need of newer techniques and algorithms to manipulate and interpret images. 'Algorithms for Image Processing and Computer Vision' is an accessible collection of algorithms for common image processing applications that simplifies complicated mathematical calculations