Home > Store

C++ Algorithms for Digital Signal Processing, 2nd Edition

Register your product to gain access to bonus material or receive a coupon.

C++ Algorithms for Digital Signal Processing, 2nd Edition

Book

  • Sorry, this book is no longer in print.
Not for Sale

Description

  • Copyright 1999
  • Dimensions: 7" x 9-1/4"
  • Pages: 600
  • Edition: 2nd
  • Book
  • ISBN-10: 0-13-179144-3
  • ISBN-13: 978-0-13-179144-2

Bring the power and flexibility of C++ to all your DSP applications

The multimedia revolution has created hundreds of new uses for Digital Signal Processing, but most software guides have continued to focus on outdated languages such as FORTRAN and Pascal for managing new applications. Now C++ Algorithms for Digital Signal Processing applies object-oriented techniques to this growing field with software you can implement on your desktop PC. C++ Algorithms for Digital Signal Processing's programming methods can be used for applications as diverse as:

  • Digital audio and video
  • Speech and image processing
  • Digital communications
  • Radar, sonar, and ultrasound signal processing

Complete coverage is provided, including:

  • Overviews of DSP and C++
  • Hands-on study with dozens of exercises
  • Extensive library of customizable source code
  • Import and Export of Microsoft WAV and Matlab data files

Multimedia professionals, managers, and even advanced hobbyists will appreciate C++ Algorithms for Digital Signal Processing as much as students, engineers, and programmers. It's the ideal bridge between programming and signal processing, and a valuable reference for experts in either field.

Source code for all of the DSP programs and DSP data associated with the examples discussed in this book and Appendix B and the file README.TXT which provide more information about how to compile and run the programs can be downloaded from www.informit.com/title/9780131791442

Downloads

CD Contents

Untitled Document Download the CD-ROM for this title.

Sample Content

Downloadable Sample Chapter

Click here for a sample chapter for this book: 0131791443.pdf

Table of Contents



Preface.


List of Key Symbols.


1. Digital Signal Processing Fundamentals.

Sequences.

The Sampling Function. Sampled Signal Spectra. Continuous- and Discrete Time Signal Spectra. The Impulse Sequence.

Linear Time Invariant Operators.

Causality. Difference Equations. The z-transform Description of Linear Operators. Frequency Domain Transfer Function of an Operator. Frequency Response Relationship to the z-transform. Summary of Linear Operators.

Digital Filters.

FIR Filters. Linear Phase in FIR Filters. IIR Filters. Example Filter Responses. Filter Specifications. Filter Structures.

The Discrete Fourier Transform.

Form of the DFT. Properties of the DFT. Power Spectrum. Averaged Periodograms. The Fast Fourier Transform. FFT Example Result.

Nonlinear Operators.

Clipping and Compression. _-law and A-law Compression. Filtering by Sorting: Median and Min/Max Filters.

Linear Algebra: Matrices and Vectors.

Vectors. Properties of Matrix Mathematics.

Probability and Random Processes.

Basic Probability. Random Variables. Mean, Variance, and Gaussian Random Variables. Quantization of Sequences. Random Processes, Autocorrelation, and Spectral Density. Modeling Real-World Signals With AR Processes.

Adaptive Filters and Systems.

Wiener Filter Theory. LMS Algorithms.

Two-Dimensional Signal Processing.

The Two-Dimensional Fourier Transform. Two-Dimensional Convolution. Using the FFT to Speed Up Two-Dimensional Processing. Two-Dimensional Filtering in the Transform Domain.

References.



2. Programming Fundamentals.

The Elements of DSP Programming. Variables and Data Types.

Types of Numbers. Arrays. Text Data Types: Characters and Strings.

Operators.

Assignment Operators. Arithmetic and Bitwise Operators. Combined Operators. Logical Operators. Operator Overloading. Operator Precedence and Type Conversion.

Program Control.

Conditional Execution: if-else. The switch Statement. Single-Line Conditional Expressions. Loops: while, do-while, and for. Program Jumps: break, continue, and goto. Exception Handling.

Functions.

Defining and Declaring Functions. Storage Class, Privacy, and Scope. Function Prototypes. Templates.

Macros and the C Preprocessor.

Conditional Preprocessor Directives. Macros. Inline Functions. Constant Variables.

Pointers, Arrays, and References.

Special Pointer Operators. Pointers and Dynamic Memory Allocation. Arrays of Pointers. References.

Structures.

Declaring and Referencing Structures. Member Functions. Constructors and Destructors. Pointers to Structures.

Classes.

Member Access Identifiers. Operator Overloading. Inheritance. Complex Numbers.

Input and Output.

cin, cout, and cerr. Accessing Disk Files.

Common C++ Programming Pitfalls.

Special String Characters. Array Indexing. Misusing Pointers.

Comments on Programming Style.

Software Quality. Structured Programming.

References.



3. User Interface and Disk Storage Routines.

User Interface.

String Input. Numerical Input.

Formatted Disk Storage.

Open Formatted Data File Routines. Formatted Data Access Routines. Trailer Access Routines.

Graphic Display of Data. Exercises. References.



4. Filtering Routines.

Digital Versus Analog Filters. FIR Filters.

Floating-Point FIR Filters. Integer FIR Filters.

IIR Filters.

IIR Filter Design. IIR Filter Function.

Real-Time Filters.

FIR Real-Time Filters. Real-Time Filtering Examples.

Interpolation and Decimation.

FIR Interpolation. FIR Sample Rate Modification and Pitch Shifting.

Complex Filters.

Hilbert Transform Real-to-Complex Conversion.

Filtering to Remove Noise.

Noise Generation. Statistics Calculation. Signal-to-Noise Ratio Improvement. Filtering Quantization Noise.

Nonlinear Filtering.

Sorting. Median Filtering. Speech Compression.

Oscillators and Waveform Synthesis.

IIR Filters as Oscillators. Table-Generated Waveforms.

Adaptive Filtering and Modeling of Signals.

LMS Signal Enhancement. ARMA Modeling of Signals. AR Frequency Estimation.

Exercises. References.



5. DISCRETE FOURIER TRANSFORM ROUTINES.

The Discrete Fourier Transform Routine. The Inverse Discrete Fourier Transform. The Fast Fourier Transform Routine. The Inverse FFT Routine. Windowing Routines. Magnitude, Phase, and Logarithmic Displays. Optimizing The FFT for Real Input Sequences. Fourier Transform Examples.

FFT Test Routine. DFT Test Routine. Inverse FFT Test Routine. Real FFT Test Routine.

Fast Convolution Using the FFT. Power Spectral Estimation. Interpolation Using the Fourier Transform. Exercises. References.



6. Matrix and Vector Routines.

Vector Operations.

Vector Arithmetic. Example Vector Operations. Cross Correlation and Autocorrelation.

Matrix Operations.

Matrix Element Manipulation. Matrix Arithmetic. Matrix Inversion. Matrix Determinant. Example Matrix Routine.

Matrix Disk Storage. Least Squares Curve Fitting.

Least Squares Routine. Curve-Fitting Examples.

Exercises. References.



7. Image Processing Routines.

Transform Techniques in Image Processing.

Discrete Cosine Transform Image Compression. Coefficient Quantization in the Compressed Image. Block Coding. Discrete Cosine Transform Functions. Image Compression Routine. Image Recovery Routine. Compression And Recovery of an Image.

Histogram Processing.

Histogram Function. Histogram-Flattening Routine. Histogram-Flattening Example.

Two-Dimensional Convolution.

Convolution Speed-Up. Two-Dimensional Convolution Function. Example Convolution Routine. Two-Dimensional FFT Convolution. Edge Detection Using Convolution. Edge Detection Routine.

Nonlinear Processing of Images.

Median Filtering. Erosion And Dilation.

Exercises. References.



Appendix A: Standard C++ Class Library.

Math Functions.

Trigonometric Functions. Exponential, Log, Power, Square Root. Hyperbolic Functions. Absolute Value, Floor, Ceiling. Euclidean Distance.

Character String Functions.

Convert String to Double-Precision Number. Convert String to Integer. Number to String Conversion. String Manipulation Functions.

Memory Allocation Operators. Standard Input/Output Classes.

Get a Character from a Stream. Get a String from a Stream. Get a Block of Data from a Stream. Get a Class from a Stream. Send a Character to a Stream. Send a String or Block of Data to a Stream. Open a File. Determine the Position of a File Pointer. Reposition a File Pointer. Close a File. Formatted Output Conversion. Formatted Input Conversion.

Other Standard Functions.

Random Number Generator. Quick General Sort. Terminate a Process and Close Files.



Appendix B: DSP Function Library and Programs.

Library Functions.

User Interface Functions. Disk Storage Functions. Filter Functions. DFT Functions. Matrix Functions. Image-Processing Functions.

Programs.

WINPLOT Program. File Format Conversion Programs.



Index.

Preface

Preface
This book is written with the conviction that two current trends in engineering and programming will continue in the foreseeable future and will become very closely related. The first trend is the rapidly growing importance of digital signal processing (DSP). Digital techniques have become the method of choice in signal processing as digital computers have increased in power, speed, and convenience and as powerful microprocessors have become more available. Some examples of the applications of DSP to engineering problems are:

Radar signal processing such as:

  • Synthetic aperture radar imaging
  • Multitarget tracking
  • Radar classification and identification


Ultrasound and sonar signal processing such as:
  • Doppler flow measurement
  • Adaptive beam forming
  • Image display and enhancement


Image processing such as:
  • Target recognition
  • Pattern classification
  • Robot vision
  • Image compression and restoration

    Communications signal processing such as:
    • Frequency hopped signal tracking
    • Spread spectrum signal recovery
    • Signal modulation and demodulation
    • Adaptive equalization


    Geological signal processing such as:
    • Formation identification
    • Structure velocity estimation


    Speech signal processing such as:
    • Short-time spectral analysis
    • Speaker independent word recognition
    • Phoneme identification
    • Speech synthesis


    As DSP has engulfed signal processing, the C language is proving itself to be the most valuable programming tool for real-time and computationally intensive software tasks. Due to the nature of DSP, this second trend is related in very important ways to the first. There are two broad areas of software applications in DSP:
    • Applications where the software is used to simulate hardware
    • Applications where the software is an end product in itself

    The C and C++ languages are reasonably high-level languages suitable for either of these areas. They have aspects of high-level languages that make them suitable for simulation work and still allow the engineer to produce code whose efficiency approaches that of assembly language for real-time applications.

    The C and C++ languages have significant advantages for DSP applications over other languages such as FORTRAN and Pascal. One important reason is the utility of C data structures and C++ objects for signal processing tasks. Also, the inherent modularity of C and C++ is a valuable asset in DSP programming. Digital signal processing repetitively uses a well-defined set of mathematical tools with small parameter variations. The ordering and tailoring of these algorithms to specific applications are the art of DSP. The C and C++ languages are constructed to encourage development of external library routines and objects that can be used as building blocks in the exact way required by DSP.

    Another reason the C++ language is a good choice for DSP is the popularity and widespread use of this language. Compilers are available for all popular microprocessors including 32-bit designs. In addition, many manufacturers of digital signal processing devices (such as Texas Instruments, AT&T, Motorola, and Analog Devices) provide C compilers for both 16-bit integer and 32-bit floating-point signal processing integrated circuits. The code produced by the best compilers is compact and efficient, and there are sufficient common features among compilers to allow portable code to be written if the standard ANSI C conventions are used. This allows the C code for DSP algorithms to be used directly in embedded real-time signal processing systems. All of the programs in this book are suitable for use with any standard ANSI C compiler on UNIX systems, IBM-PC platforms, and many real-time programming environments.

    Although C++ has not been the traditional language of real-time embedded systems programmers, it has been growing in popularity for application development and fast prototyping of designs. Not only does C++ allow the programmer to fully encapsulate the data with the methods that operate on the data, its inherent modularity makes it easy to write good code. Just one look at the C++ implementation of complex math operations in Chapter 5 or vectors and matrices in Chapter 6 should give the reader some idea about the power and flexibility the language offers.

    This book is constructed in such a way that it will be most useful to the professional engineer, student, and hobbyist who is familiar with both digital signal processing and programming but who is not necessarily an expert in both. This book is intended to be the ideal tool to help the reader in developing efficient, compact, and accurate programs for use in a particular DSP application. In addition, any reader who has the need to write DSP programs will be assisted by the combination of theory and actual working programs presented here. The book is useful for students of DSP and fast numerical techniques because of the numerous examples of efficient DSP algorithms and numerous exercises at the end of each chapter. The book can also serve as a quick source of debugged programs for the applications-oriented programmer who wishes to supplement an existing C or C++ library. For readers interested in a complete DSP software library, the programs presented in the text are available in a machine-readable form on the CD-ROM disk included with the book. C language versions of the C++ programs discussed in the text are also included on the CD-ROM for users of microprocessors that do not have C++ compilers available.

    The text is divided into several sections. Chapters 1 and 2 cover the basic principles to digital signal processing and C++ programming. Readers familiar with these topics may wish to skip one or both chapters. Chapter 3 covers basic use of the DSP programs, the data file formats, and user interface that will be used throughout the text. Chapters 4 and 5 cover basic one-dimensional digital signal processing techniques. Digital filtering is presented in Chapter 4, and frequency domain techniques are discussed in Chapter 5. Chapter 6 describes a C++ implementation of vectors and matrices that can be used for one-dimensional or two-dimensional signal processing. Chapter 7 discusses two-dimensional signal processing using algorithms described in Chapters 1.

    The CD-ROM disk included with the text contains source code for all of the DSP programs and DSP data associated with the examples discussed in this book. Appendix B and the file README.TXT on the disk provide more information about how to compile and run the programs. The programs are also precompiled and stored on the CD-ROM to allow the reader to try the un-modified examples on an IBM-PC platform without installing a C++ compiler. These programs have been tested using Microsoft Visual C++ version 4.2, 5.0 and 6.0 and on several UNIX platforms, but should work with most modern compilers that adhere to the ANSI C/C++ standards.

    Paul M. Embree
    Damon Danieli

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020