简体   繁体   English

OpenCV轮廓一维离散傅里叶变换

[英]Opencv contour 1D discrete Fourier transform

A problem happened about Fourier descriptor: if a contour has K point,then let 傅里叶描述符发生了一个问题:如果轮廓具有K点,则让

s(k)= x(k)+i y(k),k = 0,1,...,K-1. s(k)= x(k)+ i y(k),k = 0,1,...,K-1。

the s(k) discrete Fourier transform is s(k)离散傅里叶变换为

a(u)=∑s(k)*e^(-i2πuk/K), k = 0,1,...,K-1. a(u)= ∑s(k)* e ^(-i2πuk/ K),k = 0,1,...,K-1。

I want to inverse the contour with a(p) ,p=0,1...,P,the P is less than K. But when use dft function in Opencv: 我想用a(p),p = 0,1 ...,P反转轮廓,P小于K。但是在Opencv中使用dft函数时:

dft(inputarray,outputarray,DFT_INVERSE,0); dft(inputarray,outputarray,DFT_INVERSE,0);

the output array has the same size with input array, how can I get a K points contour with P parameters a(p)? 输出数组的大小与输入数组的大小相同,如何获得带有P参数a(p)的K点轮廓? Thanks!! 谢谢!!

实际上输出数组的大小应该等于输入数组的大小,修改DFT的数学模型https://ccrma.stanford.edu/~jos/mdft/Mathematics_DFT.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM