{"id":29871624,"url":"https://github.com/subvision-soft/subvision-core","last_synced_at":"2026-04-05T22:07:53.430Z","repository":{"id":301778411,"uuid":"1001993481","full_name":"subvision-soft/subvision-core","owner":"subvision-soft","description":"The core algorithms behind subvision","archived":false,"fork":false,"pushed_at":"2025-07-10T20:08:16.000Z","size":65867,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-11T02:24:11.042Z","etag":null,"topics":["computer-vision","emscripten","opencv","wasm"],"latest_commit_sha":null,"homepage":"","language":"C++","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/subvision-soft.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-14T13:38:08.000Z","updated_at":"2025-06-28T18:57:16.000Z","dependencies_parsed_at":"2025-06-28T19:46:40.266Z","dependency_job_id":"097ac431-aa5d-41a2-8779-e6c3cb33aa61","html_url":"https://github.com/subvision-soft/subvision-core","commit_stats":null,"previous_names":["subvision-soft/subvision-core"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/subvision-soft/subvision-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subvision-soft%2Fsubvision-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subvision-soft%2Fsubvision-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subvision-soft%2Fsubvision-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subvision-soft%2Fsubvision-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/subvision-soft","download_url":"https://codeload.github.com/subvision-soft/subvision-core/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subvision-soft%2Fsubvision-core/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267930460,"owners_count":24167470,"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-07-30T02:00:09.044Z","response_time":70,"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":["computer-vision","emscripten","opencv","wasm"],"created_at":"2025-07-30T20:01:23.174Z","updated_at":"2026-04-05T22:07:53.153Z","avatar_url":"https://github.com/subvision-soft.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Subvision Core\n\n**Subvision Core** is a cross-platform C++ computer vision library powering\nthe [Subvision](https://github.com/subvision-soft) underwater target shooting scoring system.\n\nSubvision is a mobile and web app developed to detect, locate, and score impacts on underwater target shooting sheets.\nIt aims to be validated by the **FFESSM** (French Underwater Federation) for official competition use.\n\n---\n\n## 🚀 Features\n\n- C++ core logic for:\n    - Sheet detection\n    - Target detection\n    - Impact localization\n    - Score computation\n- **Multiple platform support:**\n    - WebAssembly build for browser usage\n    - .NET bindings via C++/CLI for Windows applications\n    - Native C++ library\n- Dockerized build environment for consistency\n\n---\n\n## 📁 Repository Structure\n```\n├── include/                # Header files\n├── src/                    # C++ core source files\n├── test/                   # Unit tests\n├── web/                    # HTML test interface\n├── emscripten_binding.cpp  # Emscripten JavaScript bindings\n├── cli_wrapper.cpp         # C++/CLI .NET bindings\n├── CMakeLists.txt          # CMake build configuration\n├── Makefile                # WebAssembly build system\n└── build_wasm/             # WebAssembly output (generated)\n```\n\n---\n\n## ⚙️ Prerequisites\n\n### For WebAssembly Build:\n- [Docker](https://www.docker.com/)\n- Internet access to pull the image `ghcr.io/subvision-soft/subvision-emscripten:2025.6.1`\n\n### For .NET Build:\n- Windows with Visual Studio 2022\n- CMake 3.30.5+\n- OpenCV 4.x (installed via chocolatey: `choco install opencv`)\n- .NET Framework 4.7.2+ or .NET 6+\n\n---\n\n## 🐳 Docker Image\n\nBuilds use the `ghcr.io/subvision-soft/subvision-emscripten:2025.6.1` Docker image, which is maintained in\nthe [Subvision Stack project](https://github.com/subvision-soft/subvision-stack).\n\nThis image includes:\n\n- Emscripten SDK\n- OpenCV with pkg-config\n- CMake and other tools required for building C++ and WASM\n\n---\n\n## 🔨 How to Build\n\n### WebAssembly Build\n\nRun the following commands depending on your target:\n\n```bash\n# Build both versions (standard + ES6)\nmake all\n\n# Build the standard WebAssembly version\nmake subvision\n\n# Build the ES6 module WebAssembly version\nmake subvision_es6\n```\n\nThe output will be located in the `build_wasm/` directory.\n\n### .NET Build (Windows)\n\n```bash\n# Build the C++/CLI .NET wrapper for x64\nmkdir build-dotnet-x64\ncd build-dotnet-x64\ncmake -G \"Visual Studio 17 2022\" -A x64 -DBUILD_CLI_WRAPPER=ON ..\ncmake --build . --config Release\n\n# Build for x86 (32-bit)\ncd ..\nmkdir build-dotnet-x86\ncd build-dotnet-x86\ncmake -G \"Visual Studio 17 2022\" -A Win32 -DBUILD_CLI_WRAPPER=ON ..\ncmake --build . --config Release\n```\n\nThe output will be:\n- `build-dotnet-x64\\bin\\x64\\SubvisionNET-x64.dll` (64-bit)\n- `build-dotnet-x86\\bin\\x86\\SubvisionNET-x86.dll` (32-bit)\n\n### Native C++ Build\n\n```bash\n# Build native library and tests\nmkdir build\ncd build\ncmake ..\ncmake --build . --config Release\n\n# Run tests\ncd test\n./subvision_tests\n```\n\n---\n\n## 📦 Output Files\n\n### WebAssembly\n\n| File                  | Description                            |\n|-----------------------|----------------------------------------|\n| subvision_core.js     | WebAssembly wrapper (standard version) |\n| subvision_core_es6.js | WebAssembly wrapper using ES6 modules  |\n| index.html            | Test interface for running in browser  |\n\n### .NET\n\n| File                   | Description                              |\n|------------------------|------------------------------------------|\n| SubvisionNET-x64.dll   | .NET assembly for 64-bit applications    |\n| SubvisionNET-x86.dll   | .NET assembly for 32-bit applications    |\n\n---\n\n## 💻 Usage Examples\n\n### JavaScript (WebAssembly)\n\n```javascript\nimport SubvisionCV from './subvision_core_es6.js';\n\nconst module = await SubvisionCV();\n\n// Process target image\nconst results = module.processTargetImage(width, height, imageData);\nconsole.log('Impacts:', results.impacts);\n\n// Get sheet coordinates\nconst coords = module.getSheetCoordinates(width, height, imageData);\nconsole.log('Corners:', coords);\n```\n\n### C# (.NET)\n\n```c++\nusing SubvisionNET;\n\n// Load image as RGBA byte array\nbyte[] imageData = LoadImageAsRGBA(\"target.jpg\", out int width, out int height);\n\n// Process target to detect impacts\nvar results = SubvisionCore.ProcessTargetImage(imageData, width, height);\nforeach (var impact in results.Impacts)\n{\n    Console.WriteLine($\"Impact: Distance={impact.Distance}, Score={impact.Score}\");\n}\n\n// Get sheet coordinates\nvar coords = SubvisionCore.GetSheetCoordinates(imageData, width, height);\n```\n\n---\n\n## 🛠️ Build Targets\n\n### Makefile (WebAssembly)\n\n| Target        | Description                          |\n|---------------|--------------------------------------|\n| all           | Build both standard and ES6 versions |\n| subvision     | Build standard WebAssembly version   |\n| subvision_es6 | Build ES6 module WebAssembly version |\n| help          | Show help message                    |\n\n### CMake Options\n\n| Option              | Description                     | Default |\n|---------------------|---------------------------------|---------|\n| BUILD_TESTS         | Build unit tests                | ON      |\n| BUILD_CLI_WRAPPER   | Build C++/CLI .NET wrapper      | OFF     |\n| EMSCRIPTEN          | Build for WebAssembly           | OFF     |\n\n## 📄 License\n\nMIT License – see [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubvision-soft%2Fsubvision-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsubvision-soft%2Fsubvision-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubvision-soft%2Fsubvision-core/lists"}