![]() Once you extract the files, you’ll have a directory organized as follows: $ tree -dirsfirst Start by using the “Downloads” section of this tutorial to download the source code and example images. Reviewing the mathematical details of the Fast Fourier Transform is outside the scope of this blog post, so if you’re interested in learning more about it, I suggest you read this article on the FFT and its relation to image processing.įor readers who are academically inclined, take a look at Aaron Bobick’s fantastic slides from Georgia Tech’s computer vision course.įinally, the Wikipedia page on the Fourier Transform goes into more detail on the mathematics including its applications to non-image processing tasks. Therefore, the FFT represents the image in both real and imaginary components.īy analyzing these values, we can perform image processing routines such as blurring, edge detection, thresholding, texture analysis, and yes, even blur detection. In terms of computer vision, we often think of the FFT as an image processing tool that represents an image in two domains: Conversely, a frequency domain signal could be converted back into the time domain using the FFT. For example, electrical engineers, particularly those working with wireless, power, and audio signals, need the FFT calculation to convert time-series signals into the frequency domain because some calculations are more easily made in the frequency domain. The FFT is useful in many disciplines, ranging from music, mathematics, science, and engineering. It is used for converting a signal from one domain into another. The Fast Fourier Transform is a convenient mathematical algorithm for computing the Discrete Fourier Transform. What is the Fast Fourier Transform (FFT)?įigure 2: We’ll use a combination of OpenCV and NumPy to conduct Fast Fourier Transform (FFT)-based blur detection in images and video streams in this tutorial. ![]() ![]() Keep in mind that computer vision applications are meant to be intelligent, hence the term, artificial intelligence - and sometimes, that “intelligence” can simply be detecting when input data is of poor quality or not rather than trying to make sense of it. Such a blur detection procedure could either automatically discard the poor quality images or simply tell the end user “Hey bud, try again. Instead of trying to handle edge cases where image quality is extremely poor, simply detect and discard the poor quality images (such as ones with significant blur). The key takeaway here is that it’s always easier to write computer vision code for images captured under ideal conditions. Applying OCR to real-time video streams, but only applying the expensive OCR computation to non-blurry frames.Helping professional photographers sort through 100s to 1000s of photos during a photo shoot by automatically discarding the blurry/low quality ones.Possible applications of blur detection include: To learn how to use OpenCV and the Fast Fourier Transform (FFT) to perform blur detection, just keep reading.įigure 1: How can we use OpenCV and the Fast Fourier Transform (FFT) algorithm to automatically detect whether a photo is blurry? ( image source)īlur detection, as the name suggests, is the process of detecting whether an image is blurry or not. It still requires some manual tuning, but as we’ll find out, the FFT blur detector we’ll be covering is far more robust and reliable than the variance of the Laplacian method.īy the end of this tutorial, you’ll have a fully functioning FFT blur detector that you can apply to both images and video streams. The method we’ll be covering here today relies on computing the Fast Fourier Transform of the image. If you could control your lighting conditions, environment, and image capturing process, it worked quite well - but if not, you would obtain mixed results, to say the least. The downside is that the Laplacian method required significant manual tuning to define the “threshold” at which an image was considered blurry or not. Could be implemented in only a single line of code.Relied on computing the variance of the Laplacian operator.Today’s tutorial is an extension of my previous blog post on Blur Detection with OpenCV.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |