{"id":18400820,"url":"https://github.com/jankovicsandras/autoimagemorph","last_synced_at":"2025-04-07T06:33:53.678Z","repository":{"id":41100857,"uuid":"294332837","full_name":"jankovicsandras/autoimagemorph","owner":"jankovicsandras","description":"Automatic Image Morphing","archived":false,"fork":false,"pushed_at":"2020-09-10T07:36:24.000Z","size":4936,"stargazers_count":68,"open_issues_count":1,"forks_count":14,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-22T14:11:18.227Z","etag":null,"topics":["automation","cli","command-line","command-line-tool","delaunay","delaunay-triangulation","image-morphing","image-processing","image-warping","opencv","python","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jankovicsandras.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":"2020-09-10T07:15:28.000Z","updated_at":"2025-03-11T09:22:47.000Z","dependencies_parsed_at":"2022-09-09T02:32:04.912Z","dependency_job_id":null,"html_url":"https://github.com/jankovicsandras/autoimagemorph","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/jankovicsandras%2Fautoimagemorph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jankovicsandras%2Fautoimagemorph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jankovicsandras%2Fautoimagemorph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jankovicsandras%2Fautoimagemorph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jankovicsandras","download_url":"https://codeload.github.com/jankovicsandras/autoimagemorph/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247607783,"owners_count":20965945,"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":["automation","cli","command-line","command-line-tool","delaunay","delaunay-triangulation","image-morphing","image-processing","image-warping","opencv","python","python3"],"created_at":"2024-11-06T02:36:53.746Z","updated_at":"2025-04-07T06:33:48.669Z","avatar_url":"https://github.com/jankovicsandras.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n![alt Automatic Image Morphing logo](f.gif)\n\n# Automatic Image Morphing\n\n### Version 1.0.0\n### This is a Python command line application.\n\n## This is adapted from Python Image Morpher (PIM) by David Dowd. https://github.com/ddowd97/Morphing\nDavid's Python Image Morpher (PIM) is a great tool with a nice GUI. You should use it when you want to select the morph-points manually. This leads to much better results, at the expense of manual work.\n```autoimagemorph.py``` selects the morph-points automatically using OpenCV ```cv2.goodFeaturesToTrack()``` . No manual work required, starting the command will generate and save the image sequence (animation frames).\n\n## Additional features:\n- automatic triangle points selection using ```cv2.goodFeaturesToTrack()```\n- No GUI, single file command line program\n- batch processing: transition between many images, not just 2\n- optional subpixel processing to fix image artifacts\n- automatic image dimensions safety (the dimensions of the first image defines the output)\n\n## Warning\nBe careful when using the required ```-outprefix``` parameter.  The program overwrites ```\u003coutprefix\u003e\u003csequencenumber\u003e.png``` files without warning. Example: ```... -outprefix f ...``` can overwrite ```f1.png```, ```f2.png``` ... Backup your png files before running the program and avoid name conflicts.\n\n## Examples\nHelp:\n\n```python autoimagemorph.py -h```\n\n----\nThis will create and save ```f1.png```, ```f2.png```, ... ```f29.png```, then ```f31.png```, ```f32.png```, ... ```f59.png``` creating a continuous image sequence between the keyframes. The keyframes ```f0.png```, ```f30.png``` and ```f60.png``` will not be modified (overwritten), but only if the framerate matches their filename.\n\n```python autoimagemorph.py -inframes \"['f0.png','f30.png','f60.png']\" -outprefix f -framerate 30```\n\n----\nThis is how the logo ```f.gif``` was created:\n\n1. Got some [van Gogh self portraits from Wikipedia](https://en.wikipedia.org/wiki/Vincent_van_Gogh) , converted and renamed them to keyframes ```f0.png```, ```f30.png```, ...\n\n2. Ran this and took a nap. :)  The process took more than an hour.\n\n```python autoimagemorph.py -inframes \"['f0.png','f30.png','f60.png','f90.png','f120.png','f150.png','f0.png']\" -outprefix f -framerate 30 -subpixel 4```\n\n3. FFmpeg postprocessing:\n\n```ffmpeg -framerate 15 -i f%d.png f.gif```\n\n## Install dependencies:\n```pip install scipy numpy matplotlib opencv-python```\n\n## Recommended postprocessing:\nInstall FFmpeg:  https://ffmpeg.org/\n\nThen, from command line:\n\n```ffmpeg -framerate 15 -i frame%d.png output.avi```\n\n```ffmpeg -framerate 15 -i frame%d.png output.gif```\n\n## TODO:\n- testing, error checks, sanity checks\n- speed optimization in interpolatePoints()\n- RGBA support, currently it's only RGB\n- tuning the parameters of cv2.goodFeaturesToTrack() in autofeaturepoints() / giving user control\n- built-in video output with cv2 ?\n- image scaling uses cv2.INTER_CUBIC ; tuning / giving user control ?\n- LinAlgError sometimes? Image dimensions should be even numbers?\n\n## License\n### The Unlicense / PUBLIC DOMAIN\n\nThis is free and unencumbered software released into the public domain.\n\nAnyone is free to copy, modify, publish, use, compile, sell, or\ndistribute this software, either in source code form or as a compiled\nbinary, for any purpose, commercial or non-commercial, and by any\nmeans.\n\nIn jurisdictions that recognize copyright laws, the author or authors\nof this software dedicate any and all copyright interest in the\nsoftware to the public domain. We make this dedication for the benefit\nof the public at large and to the detriment of our heirs and\nsuccessors. We intend this dedication to be an overt act of\nrelinquishment in perpetuity of all present and future rights to this\nsoftware under copyright law.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nFor more information, please refer to [http://unlicense.org](http://unlicense.org)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjankovicsandras%2Fautoimagemorph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjankovicsandras%2Fautoimagemorph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjankovicsandras%2Fautoimagemorph/lists"}