我想對Python中的圖像應用離散餘弦變換(以及相反),我想知道做什麼和如何做的最好方法是什麼。我已經看過PIL和OpenCV,但我仍然不明白如何使用它。如何將DCT應用於Python中的圖像?
8
A
回答
7
從OpenCV:
DCT(src, dst, flags) → None Performs a forward or inverse Discrete Cosine transform of a 1D or 2D floating-point array. Parameters: src (CvArr) – Source array, real 1D or 2D array dst (CvArr) – Destination array of the same size and same type as the source flags (int) – Transformation flags, a combination of the following values CV_DXT_FORWARD do a forward 1D or 2D transform. CV_DXT_INVERSE do an inverse 1D or 2D transform. CV_DXT_ROWS do a forward or inverse transform of every individual row of the input matrix. This flag allows user to transform multiple vectors simultaneously and can be used to decrease the overhead (which is sometimes several times larger than the processing itself), to do 3D and higher-dimensional transforms and so forth.
Here is an example of it being used。
該DCT也可在scipy.fftpack。
相關問題
- 1. 如何使用opencv獲取python中的圖像的dct
- 2. 如何在Python中按比例將圖像應用於圖像?
- 3. OpenGL(Python) - 將STMap(UVmap)應用於圖像?
- 4. 如何將矩陣應用於圖像
- 5. 如何將樣式應用於圖像
- 6. datacapture.cfg中的圖像大小DCT/hp teamsite
- 7. Matlab中的DCT濾波器圖像
- 8. python scipy DCT對圖像上的較小塊不起作用
- 9. Android的GPU圖像,如何將過濾器應用於圖像
- 10. 如何將圖形效果應用於QListView中的圖像?
- 11. 如何使用Swift 3將圖像應用於圖像?
- 12. 如何使用2d dct獲取png圖像的功能?
- 13. 的Python:如何將圖像
- 14. 如何將矩陣應用於opencv中的圖像?
- 15. 如何將函數應用於jQuery中的多個圖像?
- 16. 在pHash模塊中使用的DCT圖像散列函數的Python等價物
- 17. 圖像的離散餘弦變換(DCT)
- 18. 使用Python的Scipy DCT-II做2D或ND DCT
- 19. 對於dct使用fftw3庫
- 20. 如何使用CSS將圖像應用於特定的邊框?
- 21. Python模塊用於將圖像處理
- 22. 如何使用單應圖像旋轉關於圖像中心的圖像?
- 23. 如何使用Android將圖像置於圖像中?
- 24. 如何將梯度圖應用於灰度圖像
- 25. 如何將圖層(顏色)應用於圖像?
- 26. 如何將PerspectiveTransform應用於圖形對象或圖像?
- 27. 圖像和matlab和DCT變換和jpeg
- 28. 可視化DCT係數作爲圖像
- 29. 將圖像操作應用於圖像以製作新圖像
- 30. 如何將過濾器應用於Android ImageLoader加載的圖像?
不完全確定PIL和OpenCV,但同時應用DCT和反DCT基本上是將源塊與相關變換矩陣相乘。 – agibalov