{"id":16480650,"url":"https://github.com/hpjansson/cropsicle","last_synced_at":"2025-10-27T17:30:46.793Z","repository":{"id":13780324,"uuid":"16475453","full_name":"hpjansson/cropsicle","owner":"hpjansson","description":"Minimal C implementation of the Growcut area selection algorithm","archived":false,"fork":false,"pushed_at":"2020-04-04T00:25:55.000Z","size":20,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-08-12T22:53:25.875Z","etag":null,"topics":["c","graphics","image-processing"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hpjansson.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":"2014-02-03T09:58:57.000Z","updated_at":"2023-04-26T06:37:02.000Z","dependencies_parsed_at":"2022-07-30T16:39:10.469Z","dependency_job_id":null,"html_url":"https://github.com/hpjansson/cropsicle","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hpjansson%2Fcropsicle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hpjansson%2Fcropsicle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hpjansson%2Fcropsicle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hpjansson%2Fcropsicle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hpjansson","download_url":"https://codeload.github.com/hpjansson/cropsicle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219860929,"owners_count":16556009,"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":["c","graphics","image-processing"],"created_at":"2024-10-11T13:04:53.579Z","updated_at":"2025-10-27T17:30:41.527Z","avatar_url":"https://github.com/hpjansson.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"Cropsicle\n=========\n\nCropsicle is a multithreaded C implementation of the GrowCut algorithm\ndescribed in the paper \"GrowCut - Interactive Multi-Label N-D Image\nSegmentation By Cellular Automata\" by Vladimir Vezhnevets and Vadim\nKonouchine [1].\n\nIt lets you remove the background from an image with minimal input, cutting\nalong irregular boundaries.\n\n[1] http://graphicon.ru/oldgr/en/publications/text/gc2005vk.pdf\n\nBuild\n-----\n\n\u003e gcc -g -O3 cropsicle.c $(pkg-config --libs --cflags libpng) -lm -pthread -o cropsicle\n\nRun\n---\n\nThis program supports 4-channel 8-bit-per-channel RGBA PNG images only. If\nyou have something else, you must convert it to the proper format first,\nlike this:\n\n\u003e convert image.jpg -channel rgba png32:image.png\n\nPerform the GrowCut operation like this:\n\n\u003e cropsicle image.png overlay.png output.png\n\nImage is the source image, overlay is an alpha-transparent overlay with\na few green pixels spread out over the foreground you want to keep\nand red pixels over the background. The pixels don't have to be perfect red\nand green as long as the corresponding red/green channels are dominant and\nthe pixels are not transparent.\n\nEnjoy!\n\nExample\n-------\n\nExample input and output images for the cropsicle invocation above:\n\n* [image.png](http://hpjansson.org/cropsicle/example/surf.png)\n* [overlay.png](http://hpjansson.org/cropsicle/example/surf-overlay.png)\n* [output.png](http://hpjansson.org/cropsicle/example/surf-out.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhpjansson%2Fcropsicle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhpjansson%2Fcropsicle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhpjansson%2Fcropsicle/lists"}