Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 82323cc

Browse filesBrowse files
committed
Update readme of image-processing labs
1 parent b9278e4 commit 82323cc
Copy full SHA for 82323cc

File tree

Expand file treeCollapse file tree

1 file changed

+9
-20
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-20
lines changed

‎计算机图像学/labs/README.md

Copy file name to clipboardExpand all lines: 计算机图像学/labs/README.md
+9-20Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# <div align="center">2019 计算机图像学实验</div>
2-
>说明. 最开始我用的 cpp 实现了实验内容(代码在 `cpp`目录下),以及自己实现了 fft, 1d,2d。但是配置 windows上的 opencv 环境失败,代码只经过了静态语法检测,可能还有些地方有 bug。 后来我用的 python 重新实现了除 FFT 的所有算法,并将结果记录如下
2+
>说明. 最开始我用的 cpp 实现了实验内容(代码在 `cpp`目录下)。但是配置 opencv 环境失败,代码只经过了静态语法检测,可能还有些地方有 bug。 后来我用的 python 重新实现了所有算法,并将结果记录如下
33
44
## 1.1. 使用
55
### 1.1.1. 环境
@@ -90,31 +90,20 @@
9090
- Fourier 反变换 幅度,并显示
9191
- Fourier 反变换 相位,并显示
9292

93-
- 对于 c++ 实现的 快速傅里叶变换,接口定义如下
94-
```c++
95-
typedef complex<double> comp ;
96-
97-
class dft
98-
{
99-
public:
100-
dft();
101-
~dft();
102-
bool dft1d(vector<comp>&, vector<comp> const &);
103-
bool dft2d(vector<comp>&, vector<comp> const &);
104-
bool idft1d(vector<comp>&, vector<comp> const &);
105-
bool dft::_dft2d(vector<vector<comp>>& dst, vector<vector<comp>> const &src,bool isInvert=false)
106-
bool dft::dft2d(vector<vector<comp>>& dst, vector<vector<comp>> const &src)
107-
bool dft::idft2d(vector<vector<comp>>& dst, vector<vector<comp>> const &src)
108-
};
109-
```
93+
11094
实现的思路是:
111-
- 首先实现 一维的变换 dft1d, idft1d
95+
- 首先实现 一维的变换 fft, ifft
11296

11397
- 使用 快速傅里叶算法 fft,对每一层, 计算倒序数,进行计算,一个 log(n) 层,每一层计算 n次, 则一维 fft时间复杂度为 `O(nlog(n))`
11498

115-
- 然后利用傅里叶变换的可分离性,计算二维 傅里叶变换dft2d, idft2d: 先对每行进行一维变换, 然后对每列进行一维变换。
99+
- 然后利用傅里叶变换的可分离性,计算二维 傅里叶变换 fft2, ifft2: 先对每行进行一维变换, 然后对每列进行一维变换。
100+
101+
102+
傅里叶变换的总结可见[我的这篇文章](https://mbinary.xyz/dft.html)
116103

117104
结果如下
105+
118106
![](result/lab4-rect1.png)
119107
![](result/lab4-rect2.png)
120108

109+

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.