0%

Book Description

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

    Table of Contents

    1. Copyright
    2. Preface
    3. List of Key Symbols
    4. 1. Digital Signal Processing Fundamentals
      1. 1.1. Sequences
        1. 1.1.1. The Sampling Function
        2. 1.1.2. Sampled Signal Spectra
        3. 1.1.3. Continuous- and Discrete Time Signal Spectra
        4. 1.1.4. The Impulse Sequence
      2. 1.2. Linear Time Invariant Operators
        1. 1.2.1. Causality
        2. 1.2.2. Difference Equations
        3. 1.2.3. The z-transform Description of Linear Operators
        4. 1.2.4. Frequency Domain Transfer Function of an Operator
        5. 1.2.5. Frequency Response Relationship to the z-transform
        6. 1.2.6. Summary of Linear Operators
      3. 1.3. Digital Filters
        1. 1.3.1. FIR Filters
        2. 1.3.2. Linear Phase in FIR Filters
        3. 1.3.3. IIR Filters
        4. 1.3.4. Example Filter Responses
        5. 1.3.5. Filter Specifications
        6. 1.3.6. Filter Structures
      4. 1.4. The Discrete Fourier Transform
        1. 1.4.1. Form of the DFT
        2. 1.4.2. Properties of the DFT
        3. 1.4.3. Power Spectrum
        4. 1.4.4. Averaged Periodograms
        5. 1.4.5. The Fast Fourier Transform
        6. 1.4.6. FFT Example Result
      5. 1.5. Nonlinear Operators
        1. 1.5.1. Clipping and Compression
        2. 1.5.2. μ-law and A-law Compression
        3. 1.5.3. Filtering by Sorting: Median and Min/Max Filters
      6. 1.6. Linear Algebra: Matrices and Vectors
        1. 1.6.1. Vectors
        2. 1.6.2. Properties of Matrix Mathematics
      7. 1.7. Probability and Random Processes
        1. 1.7.1. Basic Probability
        2. 1.7.2. Random Variables
        3. 1.7.3. Mean, Variance, and Gaussian Random Variables
        4. 1.7.4. Quantization of Sequences
        5. 1.7.5. Random Processes, Autocorrelation, and Spectral Density
        6. 1.7.6. Modeling Real-World Signals With AR Processes
      8. 1.8. Adaptive Filters and Systems
        1. 1.8.1. Wiener Filter Theory
        2. 1.8.2. LMS Algorithms
      9. 1.9. Two-Dimensional Signal Processing
        1. 1.9.1. The Two-Dimensional Fourier Transform
        2. 1.9.2. Two-Dimensional Convolution
        3. 1.9.3. Using the FFT to Speed Up Two-Dimensional Processing
        4. 1.9.4. Two-Dimensional Filtering in the Transform Domain
      10. 1.10. References
    5. 2. Programming Fundamentals
      1. 2.1. The Elements of DSP Programming
      2. 2.2. Variables and Data Types
        1. 2.2.1. Types of Numbers
        2. 2.2.2. Arrays
        3. 2.2.3. Text Data Types: Characters and Strings
      3. 2.3. Operators
        1. 2.3.1. Assignment Operators
        2. 2.3.2. Arithmetic and Bitwise Operators
        3. 2.3.3. Combined Operators
        4. 2.3.4. Logical Operators
        5. 2.3.5. Operator Overloading
        6. 2.3.6. Operator Precedence and Type Conversion
      4. 2.4. Program Control
        1. 2.4.1. Conditional Execution: if-else
        2. 2.4.2. The switch Statement
        3. 2.4.3. Single-Line Conditional Expressions
        4. 2.4.4. Loops: while, do-while, and for
        5. 2.4.5. Program Jumps: break, continue, and goto
        6. 2.4.6. Exception Handling
      5. 2.5. Functions
        1. 2.5.1. Defining and Declaring Functions
        2. 2.5.2. Storage Class, Privacy, and Scope
        3. 2.5.3. Function Prototypes
        4. 2.5.4. Templates
      6. 2.6. Macros and the C Preprocessor
        1. 2.6.1. Conditional Preprocessor Directives
        2. 2.6.2. Macros
        3. 2.6.3. Inline Functions
        4. 2.6.4. Constant Variables
      7. 2.7. Pointers, Arrays, and References
        1. 2.7.1. Special Pointer Operators
        2. 2.7.2. Pointers and Dynamic Memory Allocation
        3. 2.7.3. Arrays of Pointers
        4. 2.7.4. References
      8. 2.8. Structures
        1. 2.8.1. Declaring and Referencing Structures
        2. 2.8.2. Member Functions
        3. 2.8.3. Constructors and Destructors
        4. 2.8.4. Pointers to Structures
      9. 2.9. Classes
        1. 2.9.1. Member Access Identifiers
        2. 2.9.2. Operator Overloading
        3. 2.9.3. Inheritance
        4. 2.9.4. Complex Numbers
      10. 2.10. Input and Output
        1. 2.10.1. cin, cout, and cerr
        2. 2.10.2. Accessing Disk Files
      11. 2.11. Common C++ Programming Pitfalls
        1. 2.11.1. Special String Characters
        2. 2.11.2. Array Indexing
        3. 2.11.3. Misusing Pointers
      12. 2.12. Comments on Programming Style
        1. 2.12.1. Software Quality
        2. 2.12.2. Structured Programming
      13. 2.13. References
    6. 3. User Interface and Disk Storage Routines
      1. 3.1. User Interface
        1. 3.1.1. String Input
        2. 3.1.2. Numerical Input
      2. 3.2. Formatted Disk Storage
        1. 3.2.1. Open Formatted Data File Routines
        2. 3.2.2. Formatted Data Access Routines
        3. 3.2.3. Trailer Access Routines
      3. 3.3. Graphic Display of Data
      4. 3.4. Exercises
      5. 3.5. References on User Interface
    7. 4. Filtering Routines
      1. 4.1. Digital Versus Analog Filters
      2. 4.2. FIR Filters
        1. 4.2.1. Floating-Point FIR Filters
        2. 4.2.2. Integer FIR Filters
      3. 4.3. IIR Filters
        1. 4.3.1. IIR Filter Design
        2. 4.3.2. IIR Filter Function
      4. 4.4. Real-Time Filters
        1. 4.4.1. FIR Real-Time Filters
        2. 4.4.2. Real-Time Filtering Example
      5. 4.5. Interpolation and Decimation
        1. 4.5.1. FIR Interpolation
        2. 4.5.2. FIR Sample Rate Modification and Pitch Shifting
      6. 4.6. Complex Filters
        1. 4.6.1. Hilbert Transform Real-to-Complex Conversion
      7. 4.7. Filtering to Remove Noise
        1. 4.7.1. Noise Generation
        2. 4.7.2. Statistics Calculation
        3. 4.7.3. Signal-to-Noise Ratio Improvement
        4. 4.7.4. Filtering Quantization Noise
      8. 4.8. Nonlinear Filtering
        1. 4.8.1. Sorting
        2. 4.8.2. Median Filtering
        3. 4.8.3. Speech Compression
      9. 4.9. Oscillators and Waveform Synthesis
        1. 4.9.1. IIR Filters as Oscillators
        2. 4.9.2. Table-Generated Waveforms
      10. 4.10. Adaptive Filtering and Modeling of Signals
        1. 4.10.1. LMS Signal Enhancement
        2. 4.10.2. ARMA Modeling of Signals
        3. 4.10.3. AR Frequency Estimation
      11. 4.11. Exercises
      12. 4.12. References
    8. 5. Discrete Fourier Transform Routines
      1. 5.1. The Discrete Fourier Transform Routine
      2. 5.2. The Inverse Discrete Fourier Transform
      3. 5.3. The Fast Fourier Transform Routine
      4. 5.4. The Inverse FFT Routine
      5. 5.5. Windowing Routines
      6. 5.6. Magnitude, Phase, and Logarithmic Displays
      7. 5.7. Optimizing the FFT for Real Input Sequences
      8. 5.8. Fourier Transform Examples
        1. 5.8.1. FFT Test Routine
        2. 5.8.2. DFT Test Routine
        3. 5.8.3. Inverse FFT Test Routine
        4. 5.8.4. Real FFT Test Routine
      9. 5.9. Fast Convolution Using the FFT
      10. 5.10. Power Spectral Estimation
      11. 5.11. Interpolation Using the Fourier Transform
      12. 5.12. Exercises
      13. 5.13. References
    9. 6. Matrix and Vector Routines
      1. 6.1. Vector Operations
        1. 6.1.1. Vector Arithmetic
        2. 6.1.2. Example Vector Operations
        3. 6.1.3. Cross Correlation and Autocorrelation
      2. 6.2. Matrix Operations
        1. 6.2.1. Matrix Element Manipulation
        2. 6.2.2. Matrix Arithmetic
        3. 6.2.3. Matrix Inversion
        4. 6.2.4. Matrix Determinant
        5. 6.2.5. Example Matrix Routine
      3. 6.3. Matrix Disk Storage
      4. 6.4. Least Squares Curve Fitting
        1. 6.4.1. Least Squares Routine
        2. 6.4.2. Curve-Fitting Examples
      5. 6.5. Exercises
      6. 6.6. References
    10. 7. Image Processing Routines
      1. 7.1. Transform Techniques in Image Processing
        1. 7.1.1. Discrete Cosine Transform Image Compression
        2. 7.1.2. Coefficient Quantization in the Compressed Image
        3. 7.1.3. Block Coding
        4. 7.1.4. Discrete Cosine Transform Functions
        5. 7.1.5. Image Compression Routine
        6. 7.1.6. Image Recovery Routine
        7. 7.1.7. Compression and Recovery of an Image
      2. 7.2. Histogram Processing
        1. 7.2.1. Histogram Function
        2. 7.2.2. Histogram-Flattening Routine
        3. 7.2.3. Histogram-Flattening Example
      3. 7.3. Two-Dimensional Convolution
        1. 7.3.1. Convolution Speed-Up
        2. 7.3.2. Two-Dimensional Convolution Function
        3. 7.3.3. Example Convolution Routine
        4. 7.3.4. Two-Dimensional FFT Convolution
        5. 7.3.5. Edge Detection Using Convolution
        6. 7.3.6. Edge Detection Routine
      4. 7.4. Nonlinear Processing of Images
        1. 7.4.1. Median Filtering
        2. 7.4.2. Erosion and Dilation
      5. 7.5. Exercises
      6. 7.6. References
    11. A. Standard C++ Class Library
      1. A.1. Math Functions
        1. A.1.1. Trigonometric Functions: sin, cos, tan, asin, acos, atan, atan2
        2. A.1.2. Exponential, Log, Power, Square Root: exp, log, log10, pow, sqrt
        3. A.1.3. Hyperbolic Functions: sinh, cosh, tanh
        4. A.1.4. Absolute Value, Floor, Ceiling: abs, fabs, floor, ceil
        5. A.1.5. Euclidean Distance: hypot, cabs
      2. A.2. Character String Functions
        1. A.2.1. Convert String to Double-precision Number: strtod, atof
        2. A.2.2. Convert String to Integer: strtol, atol, atoi
        3. A.2.3. Number to String Conversion: ecvt, fcvt, gcvt
        4. A.2.4. String Manipulation Functions: strcat, strncat, strcmp, strncmp, strcpy, strncpy, strlen, strchr, strrchr, strpbrk, strspn, strcspn, strtok
      3. A.3. Memory Allocation Operators
      4. A.4. Standard Input/Output Classes
        1. A.4.1. Get a Character from a Stream: get
        2. A.4.2. Get a String from a Stream: getline
        3. A.4.3. Get a Block of data from a Stream: read
        4. A.4.4. Get a Class from a Stream: operator >>
        5. A.4.5. Send a Character to a Stream: put
        6. A.4.6. Send a String or Block of data to a Stream: write
        7. A.4.7. Open a File: open
        8. A.4.8. Determine the Position of a File Pointer: tellg, tellp
        9. A.4.9. Resposition a File Pointer: seekg, seekp
        10. A.4.10. Close a File: close
        11. A.4.11. Formatted Output Conversion: printf, sprintf
        12. A.4.12. Formatted Input Conversion: scanf, sscanf
      5. A.5. Other Standard Functions
        1. A.5.1. Random Number Generator: rand, srand
        2. A.5.2. Quick General Sort: qsort
        3. A.5.3. Terminate a Process and Close Files: exit
    12. B. DSP Function Library and Programs
      1. B.1. Library Functions
        1. B.1.1. User Interface Functions
        2. B.1.2. Disk Storage Functions
        3. B.1.3. Filter Functions
        4. B.1.4. DFT Functions
        5. B.1.5. Matrix Functions
        6. B.1.6. Image Processing Functions
      2. B.2. Programs
        1. B.2.1. WINPLOT Program
        2. B.2.2. File Format Conversion Programs
    13. License Agreement and Limited Warranty
      1. Acknowledgment
    14. About the CD-ROM
      1. Installing the DSP Files
      2. Installing Visual C++ 6.0, Introductory Version
      3. Microsoft Software
    3.14.253.152