{"id":13756164,"url":"https://github.com/go-opencv/go-opencv","last_synced_at":"2025-12-18T06:02:25.516Z","repository":{"id":12390961,"uuid":"15043456","full_name":"go-opencv/go-opencv","owner":"go-opencv","description":"Go bindings for OpenCV / 2.x API in gocv / 1.x API in opencv","archived":false,"fork":false,"pushed_at":"2023-03-30T20:19:32.000Z","size":2441,"stargazers_count":1324,"open_issues_count":43,"forks_count":196,"subscribers_count":55,"default_branch":"master","last_synced_at":"2025-12-07T20:58:26.031Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/go-opencv.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":"2013-12-09T09:43:26.000Z","updated_at":"2025-10-23T08:17:45.000Z","dependencies_parsed_at":"2023-07-13T08:15:52.089Z","dependency_job_id":null,"html_url":"https://github.com/go-opencv/go-opencv","commit_stats":{"total_commits":157,"total_committers":41,"mean_commits":"3.8292682926829267","dds":0.7898089171974523,"last_synced_commit":"a4fe8ec027ccc9eb8b7d0797db7c76e61083f1db"},"previous_names":["lazywei/go-opencv"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/go-opencv/go-opencv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-opencv%2Fgo-opencv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-opencv%2Fgo-opencv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-opencv%2Fgo-opencv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-opencv%2Fgo-opencv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-opencv","download_url":"https://codeload.github.com/go-opencv/go-opencv/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-opencv%2Fgo-opencv/sbom","scorecard":{"id":432276,"data":{"date":"2025-08-11","repo":{"name":"github.com/go-opencv/go-opencv","commit":"a4fe8ec027ccc9eb8b7d0797db7c76e61083f1db"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":8,"reason":"Found 13/16 approved changesets -- score normalized to 8","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating ubuntu:trusty to ubuntu:trusty@sha256:64483f3496c1373bfd55348e88694d1c4d0c9b660dee6bfef5e12f43b9933b30","Warn: pipCommand not pinned by hash: Dockerfile:27","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   1 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 28 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T03:39:18.947Z","repository_id":12390961,"created_at":"2025-08-19T03:39:18.947Z","updated_at":"2025-08-19T03:39:18.947Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27699687,"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","status":"online","status_checked_at":"2025-12-13T02:00:09.769Z","response_time":147,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-08-03T11:00:38.182Z","updated_at":"2025-12-18T06:02:25.066Z","avatar_url":"https://github.com/go-opencv.png","language":"Go","funding_links":[],"categories":["Go","Images","Relational Databases"],"sub_categories":["Advanced Console UIs"],"readme":"Go OpenCV binding\n==================\n\n[![Join the chat at https://gitter.im/lazywei/go-opencv](https://badges.gitter.im/lazywei/go-opencv.svg)](https://gitter.im/lazywei/go-opencv?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nA Golang binding for [OpenCV](http://opencv.org/).\n\nOpenCV 1.x C API bindings through CGO, and OpenCV 2+ C++ API ([`GoCV`](gocv/)) through SWIG.\n\n-------------------\n\n## Disclaimer\n\nThis is a fork of [chai's go-opencv](https://github.com/chai2010/opencv), which has only OpenCV1 support through CGO, and all credits for OpenCV1 wrapper (except files in `gocv/` folder) should mainly go to Chai. At the time of the fork (Dec 9, 2013) the original project was inactive and was hosted on Google Code, which was a little inconvenient for community contribution. Hence, I decided to host a fork on Github so people can contribute to this project easily. Since then, some patches were added by community, and some experimental OpenCV 2 wrappers were added as well. That means this fork went on a little bit divergent way comparing to the origin project. However, now the origin project seems to be active again and be moved to GitHub starting from Aug 25, 2014. Efforts to merge the two projects are very welcome.\n\n-------------------\n\n## Install\n\n### Linux \u0026 Mac OS X\n\nInstall Go and OpenCV, you might want to install both of them via `apt-get` or `homebrew`.\n\nYou can reference the [link](https://docs.opencv.org/trunk/d7/d9f/tutorial_linux_install.html) to install required packages.\n\n```\ngo get github.com/go-opencv/go-opencv\ncd $GOPATH/src/github.com/go-opencv/go-opencv/samples\ngo run hellocv.go\n```\n\n### Windows\n\n- Install Go and MinGw\n- install OpenCV-2.4.x to MinGW dir\n\n```\n# libopencv*.dll --\u003e ${MinGWRoot}\\bin\n# libopencv*.lib --\u003e ${MinGWRoot}\\lib\n# include\\opencv --\u003e ${MinGWRoot}\\include\\opencv\n# include\\opencv2 --\u003e ${MinGWRoot}\\include\\opencv2\n\ngo get github.com/go-opencv/go-opencv\ncd ${GoOpenCVRoot}/trunk/samples \u0026\u0026 go run hellocv.go\n```\n\n## [WIP] OpenCV2 (GoCV)\n\nAfter OpenCV 2.x+, the core team no longer develop and maintain C API. Therefore, CGO will not be used in CV2 binding. Instead, we are using SWIG for wrapping. The support for OpenCV2 is currently under development, and whole code will be placed under `gocv` package.\n\nIf you want to use CV2's API, please refer to the code under `gocv/` directory. There is no too many documents for CV2 wrapper yet, but you can still find the example usages in `*_test.go`.\n\nPlease also note that the basic data structures in OpenCV (e.g., `cv::Mat`, `cv::Point3f`) are wrapped partially for now. For more detail on how to use these types, please refer to [GoCV's README](gocv/README.md).\n\n*Requirement*: we will build the wrappers based on [mat64](https://godoc.org/github.com/gonum/matrix/mat64), given it is much easier to manipulate the underlaying data. In most case, it is not necessary to access the original CV data, e.g., `cv::Mat` can be converted from/to `*mat64.Dense`.\n\n## Example\n\n### OpenCV2's initCameraMatrix2D\n\n```go\npackage main\n\nimport . \"github.com/go-opencv/go-opencv/gocv\"\nimport \"github.com/gonum/matrix/mat64\"\n\nfunc main() {\n\n\tobjPts := mat64.NewDense(4, 3, []float64{\n\t\t0, 25, 0,\n\t\t0, -25, 0,\n\t\t-47, 25, 0,\n\t\t-47, -25, 0})\n\n\timgPts := mat64.NewDense(4, 2, []float64{\n\t\t1136.4140625, 1041.89208984,\n\t\t1845.33190918, 671.39581299,\n\t\t302.73373413, 634.79998779,\n\t\t1051.46154785, 352.76107788})\n\n\tcamMat := GcvInitCameraMatrix2D(objPts, imgPts)\n\tfmt.Println(camMat)\n}\n```\n\n\n### Resizing\n\n```go\npackage main\n\nimport opencv \"github.com/go-opencv/go-opencv/opencv\"\n\nfunc main() {\n\tfilename := \"bert.jpg\"\n\tsrcImg := opencv.LoadImage(filename)\n\tif srcImg == nil {\n\t\tpanic(\"Loading Image failed\")\n\t}\n\tdefer srcImg.Release()\n\tresized1 := opencv.Resize(srcImg, 400, 0, 0)\n\tresized2 := opencv.Resize(srcImg, 300, 500, 0)\n\tresized3 := opencv.Resize(srcImg, 300, 500, 2)\n\topencv.SaveImage(\"resized1.jpg\", resized1, nil)\n\topencv.SaveImage(\"resized2.jpg\", resized2, nil)\n\topencv.SaveImage(\"resized3.jpg\", resized3, nil)\n}\n```\n\n### Webcam\n\nYet another cool example is created by @saratovsource which demos how to use webcam:\n\n```\ncd samples\ngo run webcam.go\n```\n\n### More\n\nYou can find more samples at: https://github.com/go-opencv/go-opencv/tree/master/samples\n\n## How to contribute\n\n- Fork this repo\n- Clone the main repo, and add your fork as a remote\n\n  ```\n  git clone https://github.com/go-opencv/go-opencv.git\n  cd go-opencv\n  git remote rename origin upstream\n  git remote add origin https://github.com/your_github_account/go-opencv.git\n  ```\n\n- Create new feature branch\n\n  ```\n  git checkout -b your-feature-branch\n  ```\n\n- Commit your change and push it to your repo \n\n  ```\n  git commit -m 'new feature'\n  git push origin your-feature-branch\n  ```\n\n- Open a pull request!\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-opencv%2Fgo-opencv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-opencv%2Fgo-opencv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-opencv%2Fgo-opencv/lists"}