{"id":18632481,"url":"https://github.com/aaronjackson/torch-bwconncomp","last_synced_at":"2025-11-04T07:30:26.310Z","repository":{"id":81726972,"uuid":"166244540","full_name":"AaronJackson/torch-bwconncomp","owner":"AaronJackson","description":" :cyclone: Detects and labels connected components in binary images via Torch7 / Lua","archived":false,"fork":false,"pushed_at":"2021-03-23T15:48:52.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-14T23:56:06.544Z","etag":null,"topics":["components","connected","lua","torch","torch7"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AaronJackson.png","metadata":{"files":{"readme":"README.org","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-01-17T15:03:27.000Z","updated_at":"2021-11-25T20:39:21.000Z","dependencies_parsed_at":"2023-03-13T20:07:16.331Z","dependency_job_id":null,"html_url":"https://github.com/AaronJackson/torch-bwconncomp","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/AaronJackson%2Ftorch-bwconncomp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AaronJackson%2Ftorch-bwconncomp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AaronJackson%2Ftorch-bwconncomp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AaronJackson%2Ftorch-bwconncomp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AaronJackson","download_url":"https://codeload.github.com/AaronJackson/torch-bwconncomp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239427315,"owners_count":19636710,"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":["components","connected","lua","torch","torch7"],"created_at":"2024-11-07T05:12:15.970Z","updated_at":"2025-11-04T07:30:26.283Z","avatar_url":"https://github.com/AaronJackson.png","language":"Lua","readme":"* torch-bwconncomp\n\nUsed to detect connected groups of pixels in a black and white image.\n\n- ~bwconncomp.label~ - Labels the connected components\n- ~bwconncomp.centroids~ - Identifies the centres (mean of pixels) of\n  the labelled components.\n\n** Download\n\n#+BEGIN_SRC\n$ git clone https://github.com/AaronJackson/torch-bwconncomp.git bwconncomp\n#+END_SRC\n\n\n** Example Usage\n\nBelow we create a small 8x8 Tensor and use ~bwconncomp~ to label the\nconnected groups of one:\n\n#+BEGIN_SRC\nth\u003e bwconncomp = require('bwconncomp')\n                                                                      [0.0007s]\nth\u003e Z = torch.rand(8,8):gt(0.8)\n                                                                      [0.0001s]\nth\u003e Z\n 0  0  0  0  0  1  0  0\n 1  0  1  1  1  0  0  0\n 0  0  0  0  1  0  0  1\n 0  0  0  0  1  0  0  0\n 0  1  0  0  0  0  1  1\n 1  0  0  0  0  1  0  0\n 0  0  0  1  1  0  0  0\n 1  0  0  0  0  0  0  1\n[torch.ByteTensor of size 8x8]\n\n                                                                      [0.0031s]\nth\u003e bwconncomp.label(Z)\n  0   0   0   0   0   1   0   0\n  2   0   3   3   3   0   0   0\n  0   0   0   0   3   0   0   4\n  0   0   0   0   3   0   0   0\n  0   5   0   0   0   0   6   7\n  8   0   0   0   0   9   0   0\n  0   0   0  10  10   0   0   0\n 11   0   0   0   0   0   0  12\n[torch.IntTensor of size 8x8]\n\n                                                                      [0.0033s]\nth\u003e\n#+END_SRC\n\nJust a quick hack for work. :)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronjackson%2Ftorch-bwconncomp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faaronjackson%2Ftorch-bwconncomp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronjackson%2Ftorch-bwconncomp/lists"}