最近开始学习图像识别,第一步FFT Post author:xfxia Post published:2023年9月18日 Post category:其他 代码根据csdn论坛上一位达人的C++代码改编: public class FFT { /** Creates a new instance of FFT */ public FFT(int _ex) { ex = _ex; N = (int) Math.pow(2, ex); omegaRe = new double[N]; omegaIm = new double[N]; for (int k = 0; k < N; k++) { omegaRe[k] = Math.cos(2 * Math.PI / N * k); omegaIm[k] = Math.sin(-2 * Math.PI / N * k); } } double omegaRe[]; double omegaIm[]; int ex; int N; public int rev(int x) { int in = x; int ret = 0; for (int i = 0; i < ex; i++) { ret = ret | (in % 2 << ex - i - 1); in = in >> 1; } return ret; } public void fft(double[] inputRe, double[] inputIm, double[] outputRe, double[] outputIm) { assert (inputRe.length >= N); assert (inputRe.length == inputIm.length); assert (outputRe.length == outputIm.length); assert (inputR 版权声明:本文为sttony原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。 原文链接:https://blog.csdn.net/sttony/article/details/1771341 你可能也喜欢 Item 21: Prefer std::make_unique and std::make_shared to direct use of new Harmony OS — PageSliderIndicator滑动页面指示器 Can only perform operation while a transaction is active. 微信扫码查找失败出现4,-24的原因 building workspace(sleeping)解决方案 使用下载器下载适用于arcgis的离线地图切片 JSONP实现跨域(9种跨域方案) Android报错:Caused by: org.gradle.api.internal.plugins.PluginApplicationException:…解决方案 Azure 基础知识学习 gradle入门(一)从Groovy DSL转化为KTS 千寻和省cors精度对比_为什么使用千寻cors服务?它有什么优势? Kubernetes TLS bootstrapping 计组中央处理器串讲: 理解cpu是如何工作的 数据结构与算法-栈 tp5 多表查询 LinkedBlockingQueue与ArrayBlockingQueue区别 单元测试(三)JUnit 进阶功能:Suites 打包测试、Categories 分类测试 【rust-grpc-proxy】对restful的支持 rust-grpc-proxy OpenCV——博客整理篇 什么是自助报表