{"id":14989227,"url":"https://github.com/thinking-tower/fourier-and-images","last_synced_at":"2025-04-12T00:31:57.937Z","repository":{"id":47797803,"uuid":"132234450","full_name":"thinking-tower/Fourier-and-Images","owner":"thinking-tower","description":"Fourier and Images","archived":false,"fork":false,"pushed_at":"2021-10-12T23:07:26.000Z","size":61935,"stargazers_count":85,"open_issues_count":1,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-25T20:51:14.442Z","etag":null,"topics":["fourier","fourier-analysis","fourier-series","image-manipulation","image-processing","math","mathematics","numpy","opencv","opencv-python","opencv3-python","python","python3","scipy","signal-analysis","signal-processing"],"latest_commit_sha":null,"homepage":"","language":"Python","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/thinking-tower.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-05-05T09:41:28.000Z","updated_at":"2024-02-21T15:09:23.000Z","dependencies_parsed_at":"2022-08-30T18:11:28.097Z","dependency_job_id":null,"html_url":"https://github.com/thinking-tower/Fourier-and-Images","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/thinking-tower%2FFourier-and-Images","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinking-tower%2FFourier-and-Images/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinking-tower%2FFourier-and-Images/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinking-tower%2FFourier-and-Images/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thinking-tower","download_url":"https://codeload.github.com/thinking-tower/Fourier-and-Images/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248501366,"owners_count":21114663,"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":["fourier","fourier-analysis","fourier-series","image-manipulation","image-processing","math","mathematics","numpy","opencv","opencv-python","opencv3-python","python","python3","scipy","signal-analysis","signal-processing"],"created_at":"2024-09-24T14:17:54.120Z","updated_at":"2025-04-12T00:31:53.449Z","avatar_url":"https://github.com/thinking-tower.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fourier and Images\n\n[![Build Status](https://travis-ci.org/thinking-tower/Fourier-and-Images.svg?branch=master)](https://travis-ci.org/thinking-tower/Fourier-and-Images)\n\nFourier and Images is a project that tries to draw images with circles.\n\n## Setup\n1. `pip3 install -r requirements.txt`\n1. Modify `main.py` to reflect where your images are.\n1. `python3 main.py`\n\nNote that you'll need ImageMagick only if you want to save stuff to a gif.\n\n## Example \n\nGetting one set of circles with one image:\n```\nim = Image(\"pikachu.png\", (200, 200))\npath = im.sort()\nperiod, tup_circle_rads, tup_circle_locs = Fourier(n_approx = 1000, coord_1 = path).get_circles()\nPlot(period, tup_circle_rads, tup_circle_locs, speed = 8).plot()\n```\n\n[![](https://github.com/thinking-tower/Fourier-and-Images/blob/master/example_gifs/pikachu.gif)](https://github.com/thinking-tower/Fourier-and-Images/blob/master/example_gifs/pikachu.gif \"Pikachu\")\n\n\u003e Pikachu\n\nGetting two sets of circles with one image:\n\n```\nim = Image(\"einstein.jpg\", (200, 200))\npath = im.sort()\nperiod, tup_circle_rads, tup_circle_locs = Fourier(n_approx = 1000, coord_1 = path).get_circles(mode=2)\nPlot(period, tup_circle_rads, tup_circle_locs, speed = 8).plot()\n```\nNote that the circle on the bottom left is NOT drawing any particular image.\n\n[![](https://github.com/thinking-tower/Fourier-and-Images/blob/master/example_gifs/einstein.gif)](https://github.com/thinking-tower/Fourier-and-Images/blob/master/example_gifs/einstein.gif \"Einstein\")\n\n\u003e Einstein\n\nGetting two set of circles with two image:\n```\nim_1 = Image(\"images/formula.jpeg\", (200, 200))\nim_2 = Image(\"images/dickbutt.jpg\", (200, 200))\npath_1 = im_1.sort()\npath_2 = im_2.sort()\nperiod, tup_circle_rads, tup_circle_locs = Fourier(n_approx = 1000, coord_1 = path_1, coord_2 = path_2).get_circles()\nPlot(period, tup_circle_rads, tup_circle_locs, speed = 8).plot()\n```\n\n[![](https://github.com/thinking-tower/Fourier-and-Images/blob/master/example_gifs/dickbutt_formula.gif)](https://github.com/thinking-tower/Fourier-and-Images/blob/master/example_gifs/dickbutt_formula.gif \"Dickbutt and Euler's Formula\")\n\n\u003e Dickbutt and Euler's Formula\n\nGetting visualization of how number of Fourier Series terms affects the image:\n```\nim = Image(\"images/obama.jpg\", (200, 200))\npath = im.sort()\nperiod, tup_circle_rads, tup_circle_locs = Fourier(coord_1 = path).get_circles()\nPlot(period, tup_circle_rads, tup_circle_locs, visualize = True).plot()\n```\n\n[![](https://github.com/thinking-tower/Fourier-and-Images/blob/master/example_gifs/obama.gif)](https://github.com/thinking-tower/Fourier-and-Images/blob/master/example_gifs/obama.gif \"Obama\")\n\n\u003e Obama\n\n# Warnings\nToo big of an image might cause your computer to freeze! Resizing the image to (200, 200) is a safe choice and anything above (500, 500) starts to get a bit sketchy.\n\n# Animation\nAnything above 1000 n_approximations takes a bit of time to animate. Recommend speed = 8. In this setting, saving the animation takes about 10 minutes.\n\n# Improvements\n1) Use FFT to calculate the Fourier Series coefficients\n2) Improve edge detection algorithm\n3) Improve the function(s) that order the points from the edge detection algorithm\n\nHave fun!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinking-tower%2Ffourier-and-images","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthinking-tower%2Ffourier-and-images","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinking-tower%2Ffourier-and-images/lists"}