Preface
SimpleCV is a framework for use with Python. Python is a relatively easy language to learn. For individuals who have no programming experience, Python is a popular language for introductory computer and web programming classes. There are a wealth of books on programming in Python and even more free resources available online. For individuals with prior programming experience but with no background in Python, it is an easy language to pick up.
As the name SimpleCV implies, the framework was designed to be simple. Nonetheless, a few new vocabulary items come up frequently when designing vision systems using SimpleCV. Some of the key background concepts are described below:
Computer Vision The analyzing and processing of images. These concepts can be applied to a wide array of applications, such as medical imaging, security, autonomous vehicles, etc. It often tries to duplicate human vision by using computers and cameras. Machine Vision The application of computer vision concepts, typically in an industrial setting. These applications are used for quality control, process control, or robotics. These are also generally considered the solved problems. However, there is no simple dividing line between machine vision and computer vision. For example, some advanced machine vision applications, such as 3D scanning on a production line, may still be referred to as computer vision. Tuple A list with a pair of numbers. In Python, it is written enclosed in parentheses. It is often used when describing (x, y)
coordinates, the width and height of an object, or other cases where there is a logical pairing of numbers. It has a slightly more technical definition in mathematics, but this definition covers its use in this book. NumPy Array or Matrix NumPy is a popular Python library used in many scientific computing applications, known for its fast and efficient algorithms. Since an image can also be thought of as an array of pixels, many bits of processing use NumPys array data type. When an array has two or more dimensions, it is sometimes called a Matrix. Although intimate knowledge of NumPy is not needed to understand this book, it is useful from time to time. Blob Blobs are contiguous regions of similar pixels. For example, in a picture detecting a black cat, the cat will be a blob of contiguous black pixels. They are so important in computer vision that they warrant their own chapter. They also pop up from time to time throughout the entire book. Although covered in detail later, it is good to at least know the basic concept now. JPEG, PNG, GIF or other image formats Images are stored in different ways, and SimpleCV can work with most major image formats. This book primarily uses PNGs, which are technically similar to GIFs. Both formats use non-lossy compression, which essentially means the image quality is not changed in the process of compressing it. This creates a smaller image file without reducing the quality of the image. Some examples also use JPEGs. This is a form of lossy compress, which results in even smaller files, but at the cost of some loss of image quality. PyGame PyGame appears from time to time throughout the book. Like NumPy, PyGame is a handy library for Python. It handles a lot of window and screen management work. This will be covered in greater detail in the Drawing chapter. However, it will also pop up throughout the book when discussing drawing on the screen.
Conventions Used in This Book
The following typographical conventions are used in this book:
Italic
Indicates new terms, URLs, email addresses, filenames, and file extensions.
Constant width
Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords.
Constant width bold
Shows commands or other text that should be typed literally by the user.
Constant width italic
Shows text that should be replaced with user-supplied values or by values determined by context.
Tip
This icon signifies a tip, suggestion, or general note.
Caution
This icon indicates a warning or caution.
Using Code Examples
This book is here to help you get your job done. In general, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless youre reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from OReilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your products documentation does require permission.
We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: Book Title by Some Author (OReilly). Copyright 2011 Some Copyright Holder, 978-0-596-xxxx-x.
If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at .
Safari Books Online
Note
Safari Books Online is an on-demand digital library that lets you easily search over 7,500 technology and creative reference books and videos to find the answers you need quickly.
With a subscription, you can read any page and watch any video from our library online. Read books on your cell phone and mobile devices. Access new titles before they are available for print, and get exclusive access to manuscripts in development and post feedback for the authors. Copy and paste code samples, organize your favorites, download chapters, bookmark key sections, create notes, print out pages, and benefit from tons of other time-saving features.
OReilly Media has uploaded this book to the Safari Books Online service. To have full digital access to this book and others on similar topics from OReilly and other publishers, sign up for free at http://my.safaribooksonline.com.
How to Contact Us
Please address comments and questions concerning this book to the publisher:
OReilly Media, Inc. |
1005 Gravenstein Highway North |
Sebastopol, CA 95472 |
800-998-9938 (in the United States or Canada) |
707-829-0515 (international or local) |
707-829-0104 (fax) |
We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at:
http://www.oreilly.com/catalog/ |
To comment or ask technical questions about this book, send email to:
For more information about our books, courses, conferences, and news, see our website at http://www.oreilly.com.
Find us on Facebook: http://facebook.com/oreilly
Follow us on Twitter: http://twitter.com/oreillymedia
Watch us on YouTube: http://www.youtube.com/oreillymedia
Chapter 1. Introduction