影像處理

Python

簡介

語法

形態

控制邏輯

函數

物件

輸出入

字串處理

檔案處理

記憶體管理

lambda

影音教材

應用

科學計算

微積分

符號運算

向量運算

矩陣運算

機率統計

訊號處理

語音處理

影像處理

碎形幾何

GIS 地理資訊

自動控制

機器人

Kinect

人工智慧

自然語言

分群分類

機器學習

SVM 向量機

神經網路

最佳化

遺傳演算法

視窗程式

2D繪圖

3D繪圖

Web 程式

連結C

訊息

相關網站

參考文獻

最新修改

簡體版

English

傅立葉轉換

>>> import numpy as np
>>> np.fft.fft(np.exp(2j * np.pi * np.arange(8) / 8))
array([ -3.44509285e-16 +1.14423775e-17j,
         8.00000000e+00 -5.68502218e-15j,
         2.33486982e-16 +1.22464680e-16j,
         1.44328993e-15 +1.77635684e-15j,
         9.95799250e-17 +2.33486982e-16j,
         0.00000000e+00 +1.64244978e-15j,
         1.14423775e-17 +1.22464680e-16j,  -1.44328993e-15 +1.77635684e-15j])
>>> import matplotlib.pyplot as plt
>>> t = np.arange(256)
>>> sp = np.fft.fft(np.sin(t))
>>> freq = np.fft.fftfreq(t.shape[-1])
>>> plt.plot(freq, sp.real, freq, sp.imag)
[<matplotlib.lines.Line2D object at 0x03BFCB50>, <matplotlib.lines.Line2D object at 0x03C06770>]
>>> plt.show()

參考文獻

  1. OpenCV-图像处理和计算机视觉 — http://hyry.dip.jp:8000/pydoc/opencv_intro.html
    • 读写图像和视频文件
  2. Introduction to Media Computation:A Multimedia Cookbook in Python, Mark Guzdial, December 16, 2002
  3. Python Imaging Library Handbook
  4. Python Image Tutorial
  5. Python Imaging Library (PIL)
  6. OpenCV + Python
  7. ImageMagick
  8. SciPy : ndimage

You also have an approach to image processing based on "standard" scientific modules: SciPy has a whole package dedicated to image processing: scipy.ndimage. Scipy is in effect the standard general numerical calculations package; it is based on the de facto standard array-manipulation module NumPy: images can also be manipulated as array of numbers. As for image display, Matplotlib (also part of the "science trilogy") makes displaying images quite simple.

Depending on what you mean by "image processing", a better choice might be in the numpy based libraries: mahotas, scikits.image, or scipy.ndimage. All of these work based on numpy arrays, so you can mix and match functions from one library and another.
I started the website http://pythonvision.org which has more information on these.

Facebook

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License