23,99 €
As an open source embedded single-board computer with many standard interfaces, Beagleboard is ideal for building embedded audio/video systems to realize your practical ideas. The challenge is how to design and implement a good digital processing algorithm on Beagleboard quickly and easily without intensive low-level coding.
Rapid BeagleBoard Prototyping with MATLAB and Simulink is a practical, hands-on guide providing you with a number of clear, step-by-step exercises which will help you take advantage of the power of Beagleboard and give you a good grounding in rapid prototyping techniques for your audio/video applications.
Rapid BeagleBoard Prototyping with MATLAB and Simulink looks at rapid prototyping and how to apply these techniques to your audio/video applications with Beagleboard quickly and painlessly without intensive manual low-level coding. It will take you through a number of clear, practical recipes that will help you to take advantage of both the Beagleboard hardware platform and Matlab/Simulink signal processing. We will also take a look at building S-function blocks that work as hardware drivers and interfaces for Matlab/Simulink. This gives you more freedom to explore the full range of advantages provided by Beagleboard.
By the end of this book, you will have a clear idea about Beagleboard and Matlab/Simulink rapid prototyping as well as how to develop voice recognition systems, motion detection systems with I/O access, and serial communication for your own applications such as a smart home.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Seitenzahl: 184
Veröffentlichungsjahr: 2013
Copyright © 2013 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: October 2013
Production Reference: 1211013
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-84969-604-3
www.packtpub.com
Cover Image by Abhishek Pandey (<[email protected]>)
Authors
Dr Xuewu Dai
Dr Fei Qin
Reviewers
Ezequiel Aceto
Amit Pandurang Karpe
Acquisition Editor
Joanne Fitzpatrick
Commissioning Editor
Mohammed Fahad
Technical Editors
Menza Mathew
Rohit Kumar Singh
Project Coordinator
Joel Goveya
Proofreader
Sandra Hopper
Indexer
Hemangini Bari
Graphics
Ronak Dhruv
Production Coordinator
Conidon Miranda
Cover Work
Conidon Miranda
Dr Xuewu Dai graduated (BEng) in Electronic Engineering and received his MSc in Computer Science, both from the Southwest University, Chongqing, China, in 1999 and 2003, respectively, and completed his PhD study at the School of Electrical and Electronic Engineering, University of Manchester, in 2008. He joined the School of Electronic and Information Engineering, Southwest University, as a Lecturer Assistant in 2002 and did research projects at University College London and University of Oxford.
As a researcher and R&D engineer in signal processing and dynamic system modeling, he has over 10 years' experience in MATLAB/Simulink simulation and embedded software development. More recently, he has been actively involved in wireless sensor actuator networks for various research and industrial projects (such as condition monitoring of aircraft engines, buildings, DFIG wind generators, CAN field-bus for SCADA, and optic sensors for water quality monitoring).
I would like to thank my wife Liping and my parents for their love, and allowing me to realize my own potential. I would like to thank Joel Goveya and Mohammed Fahad at Packt Publishing for their guidance throughout this process, and Amit Karpe and Ezequiel Aceto for their reviews. Finally, I would also like to acknowledge the partial financial support from the NSFC under grant 61101135.
Dr Fei Qin is currently an Assistant Professor in the Department of Electronic and Communications, University of Chinese Academy of Science, Beijing, China. He received his PhD degree from University College London, UK, in 2012. Prior to the start of his PhD, he was working for Crossbow Technology, Beijing Rep. Office as a Sr Application Engineer.
He has been working on the development of embedded systems for many different products and applications for almost ten years, including wireless network, sensor, and radar systems.
I would like to thank Dr Han, Zhengjun for his kindest advice on the motion detect algorithm, Joel Goveya and Mohammed Fahad at Packt Publishing for their support throughout this process, and Amit Karpe and Ezequiel Aceto for their reviews.
Ezequiel Aceto is a student at University of Buenos Aires (UBA), where he is attending Electronic Engineering and Computer Engineering. Also, he is a member of the Embedded Systems Labs at UBA.
He has more than eight years' experience of programming for mobile platforms like RIM's Blackberry, Google's Android, Apples iOS, and J2ME-enabled phones. Nowadays he works as CTO and Senior Developer at Everypost (http://everypost.me). Everypost is a mobile application that allows you to easily create multimedia content and post it simultaneously to your preferred social networks.
His first approach to embedded systems was at the age of 15 with the small BASIC Stamp I. And since then, he has worked with all kinds of microcontrollers (8-, 16-, and 32-bit) and programming languages, including BASIC, Assembly, C, C++, Java, Python, and Objective C.
He writes blog posts about embedded systems and mobile technologies at www.ezequielaceto.com.ar.
Amit Pandurang Karpe works for FireEye Inc., a global information security company, as a support engineer supporting their Asia-Pacific customers. He lives in Singapore with his wife, Swatee, and son, Sparsh. He has been active in the open source community from his college days, especially in Pune, where he was able to organize various activities with the help of vibrant and thriving communities such as PLUG, TechPune, ITMilan, Embedded Nirvana, and so on.
Currently he is working with the books "Getting Started with Cubieborad" and "Mastering Kali Linux for Advanced Penetration Testing".
I would like to thank the open source community without whom I couldn't have succeeded. A special thanks to the visionaries behind "BeagleBoard Project", who believed in open source hardware and led by example. Many thanks also to the community members, who keep doing a great job, which makes BeagleBoard a success.
I would like to thank the Packt Publication team, editors, project coordinator who keep doing the right things, so I can do my job to the best of my abilities.
I would like thank Pune Linux Users Group (PLUG), Embedded Group, and VSS friends, because of whom I am able to work on this project. I would also like to thank all my gurus, who helped me, and guided me in this field—Dr Vijay Gokhale, Sunil Dhadve, Sudhanwa Jogalekar, Bharathi Subramanian, Mohammed Khasim, and Niyam Bhushan.
Finally I would like to thank my family, my mother, my father, my brother, my son, and my wife, Swatee, without whose continuous support I could not have given my best efforts to this project.
You might want to visit www.PacktPub.com for support files and downloads related to your book.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at <[email protected]> for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
http://PacktLib.PacktPub.com
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books.
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.
The world of embedded system development has been evolving over the past few years with many emerging technologies in both the hardware and software fields. As an open source embedded single-board computer with many standard interfaces, BeagleBoard is an ideal embedded system development kit. Integrated with both an ARM 1GHz microprocessor and an IT's C6000 DSP processor, BeagleBoard's hardware is powerful enough to meet most demands of audio/video processing. The challenge now is how to design and implement a good digital processing algorithm on BeagleBoard quickly and easily, without intensive low-level coding. This book addresses this with the rapid prototyping tools of MATLAB/Simulink, including automatic embedded code generation and visual programming techniques, in a friendly Windows development environment.
This book is a hands-on guide for those interested in learning more about MATLAB/Simulink rapid prototyping techniques and practicing these techniques on a BeagleBoard.
Combing the power of BeagleBoard and MATLAB/Simulink, this book will walk you through a number of step-by-step exercises to give you a good grounding in rapid prototyping, and help you build your audio/video applications on a BeagleBoard. You can enjoy your ideas and algorithm development and let the big dog run your fancy inspiration.
Chapter 1, Introducing BeagleBoard, starts with an introduction to the BeagleBoard, followed by the concept of BeagleBoard-based rapid prototyping with MATLAB/Simulink. By the end of this chapter, the user will have a clear idea about the BeagleBoard and rapid prototyping on the Microsoft Windows platform.
Chapter 2, Installing Linux on the BeagleBoard, serves as a quick installation reference for new users and will look at setting up the BeagleBoard for rapid prototyping. We will then set up the development environment at a Windows 7 PC by installing some software and tools. Finally, we will connect the hardware and configure the BeagleBoard for rapid prototyping. By the end of this chapter, we will be ready to get started with our rapid prototyping and developing our applications.
Chapter 3, C/C++ Development with Eclipse on Windows, covers how to build our first program, a simple Hello World, at the Windows 7 host PC, and run it on the Linux BeagleBoard. We will be installing Eclipse Integrated Development Environment (IDE) and CodeBench Lite, a pure Windows-based cross-platform compiler on a Windows 7 host PC. Compared with setting up a cross-platform toolchain on a Linux host PC, the installation of a Windows-based toolchain is relatively straightforward, in which the configuration and path variable management are simplified with one click. Upon completion of this chapter, we will have a fully functional cross-development environment on Windows 7 and have a taste of the work flow of cross-platform embedded system development.
Chapter 4, Automatic Code Generation, looks at automatic code generation by MATLAB/Simulink for rapid prototyping. In this chapter, instead of typing lines of C code manually, we will develop our applications either in high-level MATLAB scripts or in a Simulink graphical programming environment, and generate executable standalone applications for the BeagleBoard. Two projects will be demonstrated: a program for average operation and a music player, where the techniques of tuning parameters on the fly will be used for performance optimization.
Chapter 5, Digital I/O and Serial Communication, discusses how to utilize digital I/O and serial communication ports on the BeagleBoard to drive external sensors, for example, an IR sensor for motion detection in smart home applications. We will talk in detail about voltage shifting, digital I/O operation, serial communication, and the data processing of motion detection via an IR sensor.
Chapter 6, Voice Recognition, demonstrates the rapid prototyping of a voice recognition system on a BeagleBoard, including RMS voice detection, feature extraction, pattern matching, and decision making. The demo is designed to operate for single users, and may be used in multiuser applications. The program in the demo can be further extended for various applications, such as voice control and speaker authorization in smart home applications.
Chapter 7, Digital Video-Based Motion Detector, is a step-by-step tutorial on converting a low-cost USB web-camera and a BeagleBoard into a motion detector. We will move into the rapid prototyping of video processing and develop an algorithm for capturing video frames and tracking of a moving object in the sequence of video frames. With the video processing algorithm being validated, you will be able to easily integrate it into your own embedded system and build various advanced applications, such as home security, vision analysis, and traffic monitoring.
Appendix, Wrapping Up, reviews what we have learned and looks at other interesting projects and techniques that you may use to prototype your own BeagleBoard project. It also provides a collection of links pointing you towards the resources used in this book and other information and projects you may be interested in.
Some basic skills in programming and experiences in MATLAB/Simulink are preferred. No prior knowledge of the Linux operating system or the BeagleBoard is needed, although exposure to these technologies will certainly be helpful. An in-depth knowledge of electronics is not required, and the book provides a step-by-step guide to setting up components and software in each chapter.
What you really need is a great idea about your applications and developing your algorithm in a user-friendly environment.
This book is aimed towards the amateur embedded system enthusiasts, DIYs, students, academic researchers, and R&D engineers who have some basic skills in programming and are looking for a better solution to embedded software development to implement and validate their audio/video processing algorithms on hardware.
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.
To send us general feedback, simply send an e-mail to <[email protected]>, and mention the book title via the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at <[email protected]> with a link to the suspected pirated material.
We appreciate your help in protecting our authors, and our ability to bring you valuable content.
You can contact us at <[email protected]> if you are having a problem with any aspect of the book, and we will do our best to address it.
This chapter provides an overview of this book and serves as an introduction to the BeagleBoard and rapid prototyping.
We'll first have a quick overview of what we will explore in this book, followed by a brief look at the features of BeagleBoard (with focus on the latest xM version) —an open source hardware platform borne for audio, video, and digital signal processing. Then we will introduce the concept of rapid prototyping and explain what we can do with the BeagleBoard support tools from MATLAB® and Simulink® by MathWorks®. Finally, this chapter ends with a summary.
Different from most approaches that involve coding and compiling at a Linux PC and require intensive manual configuration in command-line manner, the rapid prototyping approach presented in this book is a Windows-based approach that features a Windows PC for embedded software development through user-friendly graphic interaction and relieves the developer from intensive coding so that you can concentrate on your application and algorithms and have the BeagleBoard run your inspiration.
First of all, let's begin with a quick overview of this book.
In this book, we will go through a number of exciting projects to demonstrate how to build a prototype of an embedded audio, video, and digital signal processing system rapidly without intensive programming and coding. The main contents of this book and projects include:
By completing each chapter in the book, you will understand the workflow of building an embedded system. You will learn about setting up the development environment, writing software at a host PC running Microsoft Windows, and compiling the code for standalone ARM-executables at the BeagleBoard running Linux. Then you will learn the skills of rapid prototyping embedded audio and video systems via the BeagleBoard support tools from Simulink by MathWorks.
The main features of the techniques presented in this book are
