Wavelets
Definition: Wavelets are mathematical functions that let us divide data into different frequency components and then study each component with a resolution appropriate for its overall scale. Wavelets are used in computer imaging, animation, noise reduction and data compression.
In many fields of study, from science and engineering to economics and psychology, we need to analyze data so that we can discover underlying patterns and information. A common way of doing this is to transform the data by applying mathematical functions.
One of the best-known processing techniques is Fourier analysis, in which you can approximate a real-world data stream by adding together a series of sine and cosine curves at different frequencies; the more curves you include in your approximation, the more closely you can replicate the original data. Since we know how to work with these well-defined trigonometric curves, we can often deduce patterns in the data that would otherwise remain hidden.
But Fourier analysis has limitations. It works best when the original data has features that repeat periodically, and it has trouble with transient signals or data that shows abrupt changes, such as the spoken word. Often, we need to be able to change our analytical representation depending on the actual data, so that we can resolve more detail in specific parts of the data stream. In essence, we need a way to change scale at various points, and scale is at the heart of wavelets.
The following explanation is adapted from Dana Mackenzie’s highly recommended article “Wavelets: Seeing the Forest and the Trees” .
Consider how we view a landscape. If you’re looking down from a jet airliner in summer, a forest appears as a solid canopy of green. If you’re in a car driving by, however, you see individual trees. If you stop and move closer, you can make out individual branches and leaves. Up close, you may spot a dewdrop or an insect sitting on a leaf. With a magnifying glass, you can see structural details of the leaf and its veins.
As we get ever closer to an object, our view becomes narrower and we see finer and finer detail. In other words, as our scope becomes smaller, our resolution becomes greater.
Our eyes and mind adapt quickly to these changes in perspective, moving from the macro scale to the micro. Unfortunately, we can’t apply this technique to a photograph or computerized digital image.
If you enlarged a picture of a forest (as if you were trying to get “closer” to a tree), all you’d see is a fuzzier image; you still wouldn’t be able to make out the branch, the leaf or the dewdrop. Regardless of what you might see in the movies, no amount of “sharpening” or processing can help you see detail that hasn’t already been encoded into the image. We can't see anything smaller than a pixel, and the camera can show us only one resolution at a time.
Wavelet algorithms allow us to record or process different areas of a scene at different levels of detail (resolution) and using greater amounts of compression (scale). In essence, they let us take new photos at closer range. If you look at a collection of data (also called a signal) from a broad perspective, you’ll notice large-scale features; using a smaller, closer perspective, you can observe much smaller features.
Unlike the sinusoidal, endlessly repeating waves used in Fourier analysis, wavelets are often irregular and asymmetric, with values that die out to zero as they move farther from a central point. By decomposing a data stream into wavelets, it’s often possible to preserve and even enhance specific local features of the signal and information about its timing.
Wavelets can take almost any shape, and much of the work being done in wavelet applications is based on finding appropriate wavelet functions that work for the type of data being processed.
The first wavelet function was a simple square waveform, developed by mathematician Alfred Harr in the early 1900s. Real advancement in the field, however, began in the mid-1980s, when Jean Morlet, an engineer at a French oil company, developed wavelet-transform analysis to interpret seismic data. He then teamed with physicist Alex Grossmann to formalize the mathematics.
Moving well beyond their geophysical roots, wavelets today are used for a variety of purposes, especially in the areas of digital imaging and compression.
Depending on your needs, for example, you can use different types of compression to reduce the size of a digital image according to how much detail or accuracy you are willing to give up. Wavelet-based compression can be much more efficient than older types. Wavelets also make possible incredibly fine detail and texture mapping, such as the lifelike rendering of hair in the animated film Monsters, Inc., while still keeping file sizes and processing times manageable.
Wavelets are central to a number of image-related compression standards, including the JPEG-2000 standard for color images and WSQ, the wavelet scalar quantization gray-scale fingerprint image compression algorithm that the FBI has used since 1993 for storing its fingerprint database.
The wavelet compression in the MPEG-4 digital video standard offers better-quality Web-based video than JPEG, yet it produces files that are a fraction of the size. MPEG-4 also has several quality layers, allowing servers to adjust their output dynamically according to needed bandwidth.
Wavelets are also being used for noise reduction and image-searching techniques. Scientists are now exploring the use of wavelets for various types of medical diagnostics and for weather forecasting as well.
小波
定义: 小波是数学函数,它让我们将数据分成不同频率的分量,然后按与整体尺度相适应的分辨率分析每个分量。小波用于计算机成像、动画、降噪和数据压缩。
在很多研究领域,从科学研究与工程技术到经济学和心理学,我们需要分析数据,从而能发现基本的模式和信息。进行这种分析常用的方法就是利用数学函数做数据变换。
傅里叶分析是其中一个最著名的处理技术,通过将不同频率上的一系列正弦和余弦曲线迭加起来,你就能逼近真实世界中的数据流。在你的近似计算中曲线越多,就越能更精确地复制原始的数据。由于我们知道如何用它们定义完善的三角函数曲线,所以我们常常能推算出隐藏的数据模式。
但是傅里叶分析也有局限性。它最适合分析周期性重复的原始数据,对瞬态信号或者表现出突然变化的数据(如说的话),傅里叶分析就有困难。所以我们常常需要随实际数据改变我们的分析表示法,从而使我们能分辨出数据流中特定部分更多的细节。本质上,我们需要一种能在不同点上改变尺度的方法,而尺度就是小波的核心。
下面的解释节选于Dana Mackenzie所著、受到高度推崇的“小波: 既见森林又见树木”一书。
考虑一下我们是如何看风景的。如果你在夏天从飞机上向下看,森林就是铺天盖地的绿色。然而,若是你开车从旁边经过,你见到的是一棵棵的树木。如果你停下来,走得更靠近一些,你就能看清枝杈和树叶。再近些,你还要可以看见树叶上的露珠和昆虫。而用放大镜,你就能看清树叶和其脉络的构造细节。
当我们更靠近一个物体时,我们的视野就变窄了,看见越来越细微的细节。换言之,当我们的范围变得更小时,我们的分辨率就更高。我们的眼睛和思维能很快适应视野的变化,从宏观转到微观。可惜我们不能将此技术应用于照片或计算机化的数字图像。
如果你放大一张森林的照片(好像你在试图“走近”一棵树木),你所见到的是更模糊的图像;。你不能分辨出枝杈、树叶或露珠。不管你在电影里看到什么,任何“锐化”或处理都无助你看清细节,这些细节原本就没有编码进图像。我们见不到比像素更小的东西,照相机一次只能给我们提供一种分辨率。
小波算法允许我们以不同等级的细节(分辨率)和利用更大的压缩(比例尺),记录或处理一个场景的不同区域。本质上,它们让我们在更近的距离上拍摄新的照片。如果你从一个很宽的视野看数据的集合(也称信号),你将看到大尺寸的特性,在更小、更靠近的视野上,你能观察到更细小的特性。
与傅里叶分析中使用的无限重复的正弦波不同,小波