{"id":17991184,"url":"https://github.com/lempiy/slic0","last_synced_at":"2025-04-04T04:15:27.690Z","repository":{"id":98624684,"uuid":"206647879","full_name":"lempiy/slic0","owner":"lempiy","description":"Linear image segmentation :sunrise_over_mountains:","archived":false,"fork":false,"pushed_at":"2020-02-23T17:21:12.000Z","size":1576,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T15:37:11.727Z","etag":null,"topics":["computer-vision","image","image-processing","image-segmentation","rust","slic","slic0"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/lempiy.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}},"created_at":"2019-09-05T20:03:54.000Z","updated_at":"2024-06-12T02:29:39.000Z","dependencies_parsed_at":"2023-04-24T22:04:18.331Z","dependency_job_id":null,"html_url":"https://github.com/lempiy/slic0","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/lempiy%2Fslic0","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lempiy%2Fslic0/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lempiy%2Fslic0/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lempiy%2Fslic0/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lempiy","download_url":"https://codeload.github.com/lempiy/slic0/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247117762,"owners_count":20886439,"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":["computer-vision","image","image-processing","image-segmentation","rust","slic","slic0"],"created_at":"2024-10-29T19:20:28.752Z","updated_at":"2025-04-04T04:15:27.663Z","avatar_url":"https://github.com/lempiy.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust SLIC\n\n[![Build \u0026 Test](https://github.com/lempiy/slic0/workflows/Rust/badge.svg)](https://github.com/lempiy/slic0/actions)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/lempiy/slic0/LICENSE)\n[![Rust Documentation](https://img.shields.io/badge/api-rustdoc-blue.svg)](https://lempiy.github.io/slic0/doc/slic)\n\nRust realization of [Simple Linear Image Segmentation](http://infoscience.epfl.ch/record/177415/files/Superpixel_PAMI2011-2.pdf) \nalgorithm with SLIC0 and lowest gradient seeding support.\n\n#### Purpose\n\nLibrary can be used in all areas where image pre-processing is required. \n* Content-based image retrieval\n* Machine vision\n* Object detection\n* Recognition Tasks\n\nMore info [here](https://en.wikipedia.org/wiki/Image_segmentation).\n\n#### [Documentation](https://lempiy.github.io/slic0/doc/slic)\n\n#### Example\n\n```rust\nuse slic::get_slic;\nuse image::{open};\nfn main() {\n    let mut image = open(\"./my_image.jpg\").ok().expect(\"Cannot open image\");\n    let img = image.as_rgb8().expect(\"Cannot get RGB from DynamicImage\");\n    let mut slic = get_slic(img, 30, 10.0, true);\n    slic.compute();\n    // save segments net to file\n    slic.get_borders_image().save(\"./borders.png\").expect(\"Cannot save image on disk\");\n    // print segments as ASCII art to stdout\n    slic.labels.iter().enumerate().for_each(|(i, x)| {\n       print!(\"{}\", ((32 + *x) as u8 as char).to_string());\n       if ((i + 1) % img.width() as usize) == 0 {\n           println!();\n       }\n    });\n}\n```\n\n#### Case\n\n![test.jpg](./fixture/test.jpg)\n![test.jpg](./fixture/test_borders.jpg)\n\n\n#### License\n\nMIT © [lempiy](https://github.com/lempiy)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flempiy%2Fslic0","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flempiy%2Fslic0","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flempiy%2Fslic0/lists"}