Python Image Processing (17): pyWavelet, pythonpywavelet

Source: Internet
Author: User

Python Image Processing (17): pyWavelet, pythonpywavelet

Happy shrimp

Http://blog.csdn.net/lights_joy/

Reprinted, but keep the author information



Next, I will try python to complete wavelet-related operations. This process can be completed through the pyWavelet library.


Main features of pyWavelet:


-1D, 2D Positive and Negative discrete wavelet transform (DWT, IDWT)


-1D, 2d steady-state wavelet Transform (SWT, StationaryWavelet Transform)


-1D, 2D wavelet packet decomposition and reconstruction


-Approximate wavelet functions and scale functions


-Over 70 built-in wavelet filters support custom wavelet filters


-Single and Double Precision support


-Usage similar to Matlab Wavelet Toolbox


PyWavelet can be installed directly by using the pip command.


Write a simple script and try 1D DWT:


# -*- coding: utf-8 -*- import numpy as npimport pywtimport matplotlib.pyplot as plt# dwtx = np.linspace(-5,5,100)y = np.sin(x)(cA, cD) = pywt.dwt(y, 'db1')plt.subplot(311)plt.plot(y)plt.subplot(312)plt.plot(cA)plt.subplot(313)plt.plot(cD)plt.show()

Check the running result:



Everything works.






Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.