{"id":21235968,"url":"https://github.com/lddl/gocv-blob","last_synced_at":"2025-07-10T17:31:50.276Z","repository":{"id":47756067,"uuid":"152061390","full_name":"LdDl/gocv-blob","owner":"LdDl","description":"Basic of blob tracking using GoCV + OpenCV","archived":false,"fork":false,"pushed_at":"2023-06-23T15:49:57.000Z","size":60,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T15:51:09.941Z","etag":null,"topics":["blob-tracking","computer-vision","gocv"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LdDl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-10-08T10:26:49.000Z","updated_at":"2022-05-04T14:46:01.000Z","dependencies_parsed_at":"2023-09-24T15:25:35.712Z","dependency_job_id":null,"html_url":"https://github.com/LdDl/gocv-blob","commit_stats":{"total_commits":74,"total_committers":3,"mean_commits":"24.666666666666668","dds":"0.14864864864864868","last_synced_commit":"6cfc4542a4a05d021df62b9788f72a2b22d366a4"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/LdDl/gocv-blob","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LdDl%2Fgocv-blob","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LdDl%2Fgocv-blob/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LdDl%2Fgocv-blob/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LdDl%2Fgocv-blob/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LdDl","download_url":"https://codeload.github.com/LdDl/gocv-blob/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LdDl%2Fgocv-blob/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264619108,"owners_count":23638407,"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":["blob-tracking","computer-vision","gocv"],"created_at":"2024-11-21T00:05:15.473Z","updated_at":"2025-07-10T17:31:49.130Z","avatar_url":"https://github.com/LdDl.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gocv-blob [![GoDoc](https://godoc.org/github.com/LdDl/gocv-blob?status.svg)](https://godoc.org/github.com/LdDl/gocv-blob)[![Sourcegraph](https://sourcegraph.com/github.com/LdDl/gocv-blob/-/badge.svg)](https://sourcegraph.com/github.com/LdDl/gocv-blob?badge)[![Go Report Card](https://goreportcard.com/badge/github.com/LdDl/gocv-blob)](https://goreportcard.com/report/github.com/LdDl/gocv-blob)[![GitHub tag](https://img.shields.io/github/tag/LdDl/gocv-blob.svg)](https://github.com/LdDl/gocv-blob/releases)\nBlob tracking via GoCV package\n\n## Important notice: It is better to use [mot-go](https://github.com/LdDl/mot-go) now for tracking tasks.\n\n## Table of Contents\n\n- [About](#about)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Support](#support)\n- [Thanks](#thanks)\n\n## About\nThis small package implements basics of blob tracking: simple centroid and [Kalman filter](https://en.wikipedia.org/wiki/Kalman_filter)-based tracking\n\nThere are additional functions for checking if blob crossed horizontal (or even oblique) line.\n\n## Installation\n\nFirst of all you need OpenCV to be installed on your operation system. Also you need [GoCV](https://github.com/hybridgroup/gocv) package to be installed too. Please see ref. here https://github.com/hybridgroup/gocv#how-to-install\n\nThen you are good to go with:\n```shell\ngo get github.com/LdDl/gocv-blob/v2\n## or (if you want to use legacy version):\n## go get github.com/LdDl/gocv-blob\n```\n\np.s. do not be worried when you see *can't load package: package github.com/LdDl/gocv-blob: no Go files....* - this is just warning.\n\n## Usage\n\nIt's pretty straightforward (pseudocode'ish).\n\n```go\n// 1. Define global set of blobs\nglobal_blobs = blob.NewBlobiesDefaults()\n\n// 2. Define new blob objects\nnew_blob1 = blob.NewSimpleBlobie(image.Rectangle, how many points to store in track, class ID of object , class name of object)\nnew_blob2 = blob.NewSimpleBlobie(image.Rectangle, how many points to store in track, class ID of object , class name of object)\n// You can use NewKalmanBlobie if needed\n\n// 3. Append data to temporary set of blobs\ntmp_blobs = []*blob.Blobie{new_blob1, new_blob2}\n\n// 4. Compare blobs ()\nglobal_blobs.MatchToExisting(tmp_blobs)\n\n// 5. Repeat steps 2-4 every time when you find new objects on images. MatchToExisting() will update existing blobs and register new ones.\n```\n\nMore informative example is here: [v2/array_tracker_test.go](v2/array_tracker_test.go)\n\n**FOR LEGACY v1**:\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand\u003c/summary\u003e\n\n```go\n// 1. Define global set of blobs\nglobal_blobs = blob.NewBlobiesDefaults()\n\n// 2. Define new blob objects\nnew_blob1 = blob.NewBlobie(image.Rectangle, how many points to store in track, class ID of object , class name of object)\nnew_blob2 = blob.NewBlobie(image.Rectangle, how many points to store in track, class ID of object , class name of object)\n\n// 3. Append data to temporary set of blobs\ntmp_blobs = []*blob.Blobie{}\ntmp_blobs = append(tmp_blobs, new_blob1)\ntmp_blobs = append(tmp_blobs, new_blob2)\n\n// 4. Compare blobs ()\nglobal_blobs.MatchToExisting(tmp_blobs)\n\n// 5. Repeat steps 2-4 every time when you find new objects on images. MatchToExisting() will update existing blobs and register new ones.\n```\n\u003c/details\u003e\n\n## Support\n\nIf you have troubles or questions please [open an issue](https://github.com/LdDl/gocv-blob/issues/new).\n\n## Thanks\nBig thanks to creators and developers of [GoCV](https://gocv.io/) for providing bindings to OpenCV\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flddl%2Fgocv-blob","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flddl%2Fgocv-blob","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flddl%2Fgocv-blob/lists"}