Skip to Main Content
Learning OpenCV
book

Learning OpenCV

by Gary Bradski, Adrian Kaehler
September 2008
Beginner to intermediate content levelBeginner to intermediate
580 pages
20h 7m
English
O'Reilly Media, Inc.
Content preview from Learning OpenCV

Discrete Fourier Transform (DFT)

For any set of values that are indexed by a discrete (integer) parameter, it is possible to define a discrete Fourier transform (DFT)[81] in a manner analogous to the Fourier transform of a continuous function. For N complex numbers

image with no caption

, the one-dimensional DFT is defined by the following formula (where

image with no caption

):

image with no caption

A similar transform can be defined for a two-dimensional array of numbers (of course higher-dimensional analogues exist also):

image with no caption

In general, one might expect that the computation of the N different terms fk would require O(N2) operations. In fact, there are a number of fast Fourier transform (FFT) algorithms capable of computing these values in O(N log N) time. The OpenCV function cvDFT() implements one such FFT algorithm. The function cvDFT() can compute FFTs for one- and two-dimensional arrays of inputs. In the latter case, the two-dimensional transform can be computed or, if desired, only the one-dimensional transforms of each individual row can be computed (this operation is much faster than calling cvDFT() many separate times).

void cvDFT( const CvArr* ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning OpenCV 3

Learning OpenCV 3

Adrian Kaehler, Gary Bradski
Learning OpenCV, 2nd Edition

Learning OpenCV, 2nd Edition

Adrian Kaehler, Gary Bradski
Practical OpenCV

Practical OpenCV

Samarth Brahmbhatt
Machine Learning for OpenCV

Machine Learning for OpenCV

Michael Beyeler, Michael Beyeler (USD)

Publisher Resources

ISBN: 9780596516130Supplemental ContentErrata Page