Skip to content

LuxoriaSoft/grabcut_oc4100_dllcore

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published