{"id":20019430,"url":"https://github.com/tambapps/fourier-transform-library","last_synced_at":"2025-05-04T23:31:55.564Z","repository":{"id":44362125,"uuid":"154332196","full_name":"tambapps/fourier-transform-library","owner":"tambapps","description":"A Fast Fourier Transform library written in Java","archived":false,"fork":false,"pushed_at":"2022-12-22T12:38:59.000Z","size":230,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-08T14:11:53.487Z","etag":null,"topics":["fft","fourier-transform","fourier-transform-library","java"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tambapps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-23T13:23:52.000Z","updated_at":"2025-03-26T06:54:13.000Z","dependencies_parsed_at":"2023-01-30T09:01:10.834Z","dependency_job_id":null,"html_url":"https://github.com/tambapps/fourier-transform-library","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tambapps%2Ffourier-transform-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tambapps%2Ffourier-transform-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tambapps%2Ffourier-transform-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tambapps%2Ffourier-transform-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tambapps","download_url":"https://codeload.github.com/tambapps/fourier-transform-library/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252414393,"owners_count":21744098,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fft","fourier-transform","fourier-transform-library","java"],"created_at":"2024-11-13T08:27:34.666Z","updated_at":"2025-05-04T23:31:55.164Z","avatar_url":"https://github.com/tambapps.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Java Fourier Transform Library\n\nThis is a library for computing 1-2 dimensional Fourier Transform. It was written with Java 8, and should be Android-compatible (you can use it in an Android project).\nThis library was written **without any compile dependencies**. \n\nYou can import it with maven.\n\nIf you are more familiar with the old implementation (version 1.0), consult the [legacy branch](https://github.com/tambapps/fourier-transform-library/tree/legacy)\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.tambapps.fft4j\u003c/groupId\u003e\n  \u003cartifactId\u003efft4j\u003c/artifactId\u003e\n  \u003cversion\u003e2.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Fast Fourier Transform\nHere is an example of a 1D fast fourier transform. There are several algorithms to perform FFT\nYou can see all of them on the FastFouriers class.\n```groovy\ndouble[] inputRe = getInputDataRe();\ndouble[] inputIm = getInputDataIm();\n\ndouble[] outputRe = new double[inputRe.length];\ndouble[] outputIm = new double[inputRe.length];\n\nFastFouriers.BASIC.transform(inputRe, inputIm, outputRe, outputIm);\n\n// consult result in outputRe and outputIm\n```\n\nYou can also use a `Signal` which encapsulates a real and imaginary double arrays.\n\n```groovy\nSignal input = inputData();\nSignal output = FastFouriers.BASIC.transform(input);\n```\n\n3 different Fast Fourier Algorithms were implemented\n\n### Basic\nThis is a trivial implementation of a Fourier Transform using the basic Fourier Transform formula\n\n### Recursive Cooley–Tukey\n\nA recursive implementation of the [Cooley–Tukey FFT algorithm](https://en.wikipedia.org/wiki/Cooley%E2%80%93Tukey_FFT_algorithm).\nNote that this algorithm requires the input length to be a power of 2.\n\n### Iterative Cooley–Tukey\n\nAn iterative implementation of the [Cooley–Tukey FFT algorithm](https://en.wikipedia.org/wiki/Cooley%E2%80%93Tukey_FFT_algorithm)\nNote that this algorithm requires the input length to be a power of 2.\n\n\n## 2D Fast Fourier Transform\nYou can apply 2D FFT with a FastFourierTransformer2D. You can change the algorithm used by the transformer\nto compute fft by setting the AlgorithmChooser.\n```groovy\nSignal2d signal2d = new Signal2d(M, N);\nfill(signal2d);\n\nFastFourier2d transformer2D = new FastFourier2d();\ntransformer2D.transform(signal2d);\n// do some things with the fourier transform\ntransformer2D.inverse(signal2d);\n\n// don't forget to shut it down as it uses an executor service\ntransformer2D.shutdown();\n```\n\n## Example use case\nYou can consult the [fft-image-processing repo](https://github.com/nelson888/fft-image-processing), an app that transforms images using FFT\n![fft-image-processing-screenshot-1](https://raw.githubusercontent.com/nelson888/fft-image-processing/master/screenshots/sample1.png)\n\n![fft-image-processing-screenshot-2](https://raw.githubusercontent.com/nelson888/fft-image-processing/master/screenshots/sample2.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftambapps%2Ffourier-transform-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftambapps%2Ffourier-transform-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftambapps%2Ffourier-transform-library/lists"}