{"id":20719814,"url":"https://github.com/wthrajat/seamcarving","last_synced_at":"2025-07-07T22:07:39.768Z","repository":{"id":150975447,"uuid":"594817739","full_name":"wthrajat/seamcarving","owner":"wthrajat","description":"C++ implementation of the Seam Carving Algorithm using Dynamic Programming. Available to use as a C++ binary","archived":false,"fork":false,"pushed_at":"2024-02-01T18:01:47.000Z","size":11088,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-23T14:43:24.610Z","etag":null,"topics":["cpp","dynamic-programming","glew","image","opencv","seamcarving"],"latest_commit_sha":null,"homepage":"https://perso.crans.org/frenoy/matlab2012/seamcarving.pdf","language":"C++","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/wthrajat.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-01-29T18:23:34.000Z","updated_at":"2025-04-04T02:26:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"f94526d2-ea51-419b-ba38-23d80e989081","html_url":"https://github.com/wthrajat/seamcarving","commit_stats":null,"previous_names":["wthrajat/seam-carving","wthrajat/seamcarving"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wthrajat/seamcarving","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wthrajat%2Fseamcarving","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wthrajat%2Fseamcarving/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wthrajat%2Fseamcarving/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wthrajat%2Fseamcarving/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wthrajat","download_url":"https://codeload.github.com/wthrajat/seamcarving/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wthrajat%2Fseamcarving/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261643450,"owners_count":23188878,"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":["cpp","dynamic-programming","glew","image","opencv","seamcarving"],"created_at":"2024-11-17T03:18:26.191Z","updated_at":"2025-07-07T22:07:39.724Z","avatar_url":"https://github.com/wthrajat.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Seam Carving ![OpenCV](https://img.shields.io/static/v1?style=for-the-badge\u0026message=OpenCV\u0026color=5C3EE8\u0026logo=OpenCV\u0026logoColor=FFFFFF\u0026label=) ![C++](https://img.shields.io/static/v1?style=for-the-badge\u0026message=C%2B%2B\u0026color=00599C\u0026logo=C%2B%2B\u0026logoColor=FFFFFF\u0026label=) ![CMake](https://img.shields.io/static/v1?style=for-the-badge\u0026message=CMake\u0026color=064F8C\u0026logo=CMake\u0026logoColor=FFFFFF\u0026label=) [![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/Naereen/StrapDown.js/blob/master/LICENSE)\n\n[Seam carving](https://en.wikipedia.org/wiki/Seam_carving) (or liquid rescaling) is an algorithm for content-aware image resizing, developed by Mitsubishi Electric Research Laboratories (MERL). It functions by establishing a number of seams (paths of least importance) in an image and automatically removes seams to reduce image size or inserts seams to extend it.\nRead the paper at:\n- [Original paper](https://perso.crans.org/frenoy/matlab2012/seamcarving.pdf)\n- [ACM Digital Library](https://dl.acm.org/doi/10.1145/1275808.1276390)\n\n## Dependencies\n\nMake sure to install the following dependencies to avoid build errors:\n- [Glew](https://archlinux.org/packages/extra/x86_64/glew/)\n- [lib32-glew](https://archlinux.org/packages/multilib/x86_64/lib32-glew/)\n- [CMake](https://cmake.org/download/)\n- [OpenCV](https://opencv.org/releases/)\n\n## Build\n\n```sh\ngit clone https://github.com/wthrajat/seamcarving.git\ncd seamcarving \u0026\u0026 mkdir build \u0026\u0026 cd build \u0026\u0026 cmake .. \u0026\u0026 make\n```\nAfter compilation, this will build an executable `\"seam_carving\"` at `./build/app/`:\n```py\n./build/app/seam_carving # Executable file\n```\n\n## Usage\n\n```console\n./build/app/seam_carving \u003cinput_image\u003e \u003cdirection\u003e \u003cnumber of seams\u003e \u003cmode\u003e \u003cx\u003e \u003cy\u003e \u003cw\u003e \u003ch\u003e\n\n# OR\n\n./build/app/seam_carving \u003cinput_image\u003e \u003cdirection\u003e \u003cnumber of seams\u003e\n\n```\n\n## Arguments\n```rust\n\u003cinput_image\u003e : image_name.extension [required]\n\n\u003cdirection\u003e : 'h' OR 'v' [required]\n    'h' for horizontal seam removal\n    'w' for vertical seam removal\n\n\u003cnumber of seams\u003e : integer [required]\n\n\u003cmode\u003e : 'r' OR 'p' [optional]\n    'r' for removal\n    'p' for protection\n\n\u003cx\u003e \u003cy\u003e \u003cw\u003e \u003ch\u003e : Specifies the Region of Interest [optional]\n    'x' X-coordinate\n    'y' Y-coordinatew\n    'w' Width of the ROI\n    'h' Height of the ROI\n```\n\n## Examples\n\n\n```rust\n./build/app/seam_carving assets/ronaldo.jpeg v 300\n```\nResized | Original\n--- | ---\n\u003cimg align=\"center\" src=\"./assets/after2.png\"\u003e | \u003cimg align=\"center\" src=\"./assets/ronaldo.jpeg\"\u003e\n\n```rust\n./build/app/seam_carving assets/tower.jpg v 300\n```\nResized | Original\n--- | ---\n\u003cimg align=\"center\" src=\"./assets/tower_final.png\"\u003e | \u003cimg align=\"center\" src=\"./assets/tower.jpg\"\u003e\n\n## Video demo\n\n![video](./assets/seam-gif.gif)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwthrajat%2Fseamcarving","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwthrajat%2Fseamcarving","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwthrajat%2Fseamcarving/lists"}