DFT频率分量Opencv [英] DFT Frequency Components Opencv

查看:347
本文介绍了DFT频率分量Opencv的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用以下链接了解如何在Opencv中使用DFT

  http://docs.opencv.org /doc/tutorials/core/discrete_fourier_transform/discrete_fourier_transform.html 

我知道如何从Dft。然而,我想知道每个幅度代表什么频率,知道高频和低频的存在。你能帮我怎么解释这个吗?对于什么频率每个幅度是系数?



我想知道这个没有绘图,因为我想自动使用这个数据,而无需从图中手动引用。请帮助我

解决方案

听起来你需要一个信号处理课程,而不是计算机视觉课。你从DFT得到的是一个复杂的组件矩阵,像你放入它的图像一样大。这些对应于从0(左上)到采样频率(右下)的频率分量。频率等于采样频率的分量是具有1个像素的周期的分量。具有4个像素的水平和垂直周期的分量具有四分之一采样频率的频率,因此可以在位置[行/ 4,列/ 4]处找到,因为四倍长的周期意味着四分之一的频率。 / p>

假设您正在寻找水平周期为10像素,垂直周期为6像素的组件。此组件可在DFT结果的位置[row / 6,cols / 10]中找到。


I used the following link to learn about how to use DFT in Opencv

    http://docs.opencv.org/doc/tutorials/core/discrete_fourier_transform/discrete_fourier_transform.html

I understood how the magnitude is extracted from the Dft. However, I want to know for what frequencies each magnitude stands for, to know about the presence of high frequencies and low frequencies. Could you please help me how to intepret this? For what frequencies each magnitude is coefficient for?

I want to know this without plotting, as I want to use this data autonomously, without manually referring to from the plot. Please help me

解决方案

Sounds like you need a signal processing lesson instead of a computer vision lesson. What you get from the DFT is a matrix of complex components as big as the image you put into it. These correspond to the frequency components from 0 (top left) to the sampling frequency (bottom right). A component with frequency equal to the sampling frequency is a component with a period of 1 pixel. A component with a horizontal and vertical period of 4 pixels has a frequency of a quarter of the sampling frequency, so can be found at position [rows/4, cols/4], since four times longer period means four times smaller frequency.

Say you are looking for the component with horizontal period of 10 pixels and vertical period of 6 pixels. This component can be found at position [rows/6, cols/10] in the DFT result.

这篇关于DFT频率分量Opencv的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆