Luxoria.Algorithm.GrabCut 1.0.1

dotnet add package Luxoria.Algorithm.GrabCut --version 1.0.1
                    
NuGet\Install-Package Luxoria.Algorithm.GrabCut -Version 1.0.1
                    
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="Luxoria.Algorithm.GrabCut" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Luxoria.Algorithm.GrabCut" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Luxoria.Algorithm.GrabCut" />
                    
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 Luxoria.Algorithm.GrabCut --version 1.0.1
                    
#r "nuget: Luxoria.Algorithm.GrabCut, 1.0.1"
                    
#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 Luxoria.Algorithm.GrabCut@1.0.1
                    
#: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=Luxoria.Algorithm.GrabCut&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Luxoria.Algorithm.GrabCut&version=1.0.1
                    
Install as a Cake Tool

GrabCut Implementation in .NET

OpenCV GrabCut Algorithm

This package provides a .NET wrapper for the GrabCut algorithm, implemeted in native C++ with OpenCV.

Requirements

  • .NET Version: net8.0 or compatible.
  • Native Dependencies: OpenCV 4.10.0 libraries are embedded within the native implementation.

Source Code

The precompiled native libraries are built from the source code available at LuxoriaSoft/grabcut_oc4100_dllcore

Installation

You can install the package via NuGet Package Manager or the .NET CLI:

Using NuGet Package Manager

Search for Luxoria.Algorithm.GrabCut in the NuGet Package Manager and install it.

Using .NET CLI

Run the following command:

dotnet add package Luxoria.Algorithm.GrabCut --version 1.0.1

Usage

using Luxoria.Algorithm.GrabCut;

class Program
{
    static void Main()
    {
        GrabCut grabCut = new GrabCut();
        grabCut.Exec("image.jpg", "output.jpg", 678, 499, 1653, 1493, 5);
        // Where :
        // "image.jpg" is the input image path,
        // "output.jpg" is the output image path,
        // 678, 499, 1653, 1493 are the rectangle coordinates (x, y, width, height),
        // 5 is the margin from (0 to 100) (default set to 0)


        // Custom foreground & background masks

        GrabCut grabCut = new GrabCut();
        grabCut.Exec("image.jpg", "output.jpg", 678, 499, 1653, 1493, 5, false, Color.White, Color.Black);
        // Where :
        // "image.jpg" is the input image path,
        // "output.jpg" is the output image path,
        // 678, 499, 1653, 1493 are the rectangle coordinates (x, y, width, height),
        // 5 is the margin from (0 to 100) (default set to 0),
        // false is being used to indicate that custom colors are provided,
        // Color.White is the foreground color,
        // Color.Black is the background color

    }
}

License

Luxoria.Algorithm.BrisqueScore is licensed under the Apache 2.0 License. See LICENSE for more information.

LuxoriaSoft

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • 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
1.0.1 1,821 6/30/2025
1.0.0 131 6/28/2025