SubvisionNET 2026.4.2

dotnet add package SubvisionNET --version 2026.4.2
                    
NuGet\Install-Package SubvisionNET -Version 2026.4.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SubvisionNET" Version="2026.4.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SubvisionNET" Version="2026.4.2" />
                    
Directory.Packages.props
<PackageReference Include="SubvisionNET" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SubvisionNET --version 2026.4.2
                    
#r "nuget: SubvisionNET, 2026.4.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SubvisionNET@2026.4.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SubvisionNET&version=2026.4.2
                    
Install as a Cake Addin
#tool nuget:?package=SubvisionNET&version=2026.4.2
                    
Install as a Cake Tool

Subvision Core

Subvision Core is a cross-platform C++ computer vision library powering the Subvision underwater target shooting scoring system.

Subvision is a mobile and web app developed to detect, locate, and score impacts on underwater target shooting sheets. It aims to be validated by the FFESSM (French Underwater Federation) for official competition use.


🚀 Features

  • C++ core logic for:
    • Sheet detection
    • Target detection
    • Impact localization
    • Score computation
  • Multiple platform support:
    • WebAssembly build for browser usage
    • .NET bindings via C++/CLI for Windows applications
    • Native C++ library
  • Dockerized build environment for consistency

📁 Repository Structure

├── include/                # Header files
├── src/                    # C++ core source files
├── test/                   # Unit tests
├── web/                    # HTML test interface
├── emscripten_binding.cpp  # Emscripten JavaScript bindings
├── cli_wrapper.cpp         # C++/CLI .NET bindings
├── CMakeLists.txt          # CMake build configuration
├── Makefile                # WebAssembly build system
└── build_wasm/             # WebAssembly output (generated)

⚙️ Prerequisites

For WebAssembly Build:

  • Docker
  • Internet access to pull the image ghcr.io/subvision-soft/subvision-emscripten:2025.6.1

For .NET Build:

  • Windows with Visual Studio 2022
  • CMake 3.30.5+
  • OpenCV 4.x (installed via chocolatey: choco install opencv)
  • .NET Framework 4.7.2+ or .NET 6+

🐳 Docker Image

Builds use the ghcr.io/subvision-soft/subvision-emscripten:2025.6.1 Docker image, which is maintained in the Subvision Stack project.

This image includes:

  • Emscripten SDK
  • OpenCV with pkg-config
  • CMake and other tools required for building C++ and WASM

🔨 How to Build

WebAssembly Build

Run the following commands depending on your target:

# Build both versions (standard + ES6)
make all

# Build the standard WebAssembly version
make subvision

# Build the ES6 module WebAssembly version
make subvision_es6

The output will be located in the build_wasm/ directory.

.NET Build (Windows)

# Build the C++/CLI .NET wrapper for x64
mkdir build-dotnet-x64
cd build-dotnet-x64
cmake -G "Visual Studio 17 2022" -A x64 -DBUILD_CLI_WRAPPER=ON ..
cmake --build . --config Release

# Build for x86 (32-bit)
cd ..
mkdir build-dotnet-x86
cd build-dotnet-x86
cmake -G "Visual Studio 17 2022" -A Win32 -DBUILD_CLI_WRAPPER=ON ..
cmake --build . --config Release

The output will be:

  • build-dotnet-x64\bin\x64\SubvisionNET-x64.dll (64-bit)
  • build-dotnet-x86\bin\x86\SubvisionNET-x86.dll (32-bit)

Native C++ Build

# Build native library and tests
mkdir build
cd build
cmake ..
cmake --build . --config Release

# Run tests
cd test
./subvision_tests

📦 Output Files

WebAssembly

File Description
subvision_core.js WebAssembly wrapper (standard version)
subvision_core_es6.js WebAssembly wrapper using ES6 modules
index.html Test interface for running in browser

.NET

File Description
SubvisionNET-x64.dll .NET assembly for 64-bit applications
SubvisionNET-x86.dll .NET assembly for 32-bit applications

💻 Usage Examples

JavaScript (WebAssembly)

import SubvisionCV from './subvision_core_es6.js';

const module = await SubvisionCV();

// Process target image
const results = module.processTargetImage(width, height, imageData);
console.log('Impacts:', results.impacts);

// Get sheet coordinates
const coords = module.getSheetCoordinates(width, height, imageData);
console.log('Corners:', coords);

C# (.NET)

using SubvisionNET;

// Load image as RGBA byte array
byte[] imageData = LoadImageAsRGBA("target.jpg", out int width, out int height);

// Process target to detect impacts
var results = SubvisionCore.ProcessTargetImage(imageData, width, height);
foreach (var impact in results.Impacts)
{
    Console.WriteLine($"Impact: Distance={impact.Distance}, Score={impact.Score}");
}

// Get sheet coordinates
var coords = SubvisionCore.GetSheetCoordinates(imageData, width, height);

🛠️ Build Targets

Makefile (WebAssembly)

Target Description
all Build both standard and ES6 versions
subvision Build standard WebAssembly version
subvision_es6 Build ES6 module WebAssembly version
help Show help message

CMake Options

Option Description Default
BUILD_TESTS Build unit tests ON
BUILD_CLI_WRAPPER Build C++/CLI .NET wrapper OFF
EMSCRIPTEN Build for WebAssembly OFF

📄 License

MIT License – see LICENSE for details.

Product Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2026.4.2 106 4/6/2026
2026.4.2-pre.7321889 60 4/6/2026
2026.4.1 105 4/6/2026
2026.4.1-pre.c31ac6c 63 4/5/2026