Skip to main content
.NETStandard2.0

Aspose.Imaging.AForge.Adapter is designed to extend the functionality of the Aspose.Imaging library by adding functions from FilFormat.AForge library.

Published
Oct 2, 2024
2y ago
Total Downloads
2.1K
2,137

Install

dotnet add package Aspose.Imaging.AForge.Adapter --version 24.10.0
ProductVersions
.NET Standard
netstandard2.0

README

Aspose.Imaging.AForge.Adapter for .NET

Aspose.Imaging.AForge.Adapter is designed to extend the functionality of the Aspose.Imaging library by adding functions from FileFormat.AForge library. This association allows all raster formats supported by the Aspose.Imaging library to be covered by popular methods from the FileFormat.AForge library. The following methods from the FileFormat.AForge library are applicable to all raster formats of the Aspose.Imaging library:

  • EdgeDetector(Homogenity, Difference, Sobel, Canny)
  • BlobDetector (DetectBlobs, ExtractBiggestBlob, BlobsFiltering)
  • ExhaustiveTemplateMatching,
  • ExhaustiveBlockMatching,
  • CornersDetector (Moravec, Susan)

Platform dependence

Aspose.Imaging.AForge.Adapter for .NET can be used to develop applications on Windows Desktop (x86, x64), Windows Server (x86, x64), Windows Azure, Windows Embedded (CE 6.0 R2), as well as Linux x64. The supported platforms include .NetStandard2.0, .Net Core 3.1, .Net6.0, .Net7.0, .Net8.0.

Getting Started with Aspose.Imaging.AForge.Adapter for .NET

Are you ready to give Aspose.Imaging.AForge.Adapter for .NET a try? Simply execute

Install-Package Aspose.Imaging.AForge.Adapter

from Package Manager Console in Visual Studio to fetch the NuGet package. If you already have Aspose.Imaging.AForge.Adapter for .NET and want to upgrade the version, please execute

Update-Package Aspose.Imaging.AForge.Adapter

to get the latest version.

Product dependencies

This product is dependent on :

Usage example

Edge Detector

Aspose.Imaging.License imagingLic = new License();
System.Drawing.AsposeDrawing.License drawingLic = new System.Drawing.AsposeDrawing.License();
imagingLic.SetLicense("license.lic");
drawingLic.SetLicense("license.lic");

using (var image = (RasterImage)Image.Load("polygons.cdr.png"))
{
    image.EdgeDetector(image.Bounds, EdgeDetectorType.Canny);
    image.Save("result.png");
}

Blob Detector

Aspose.Imaging.License imagingLic = new License();
System.Drawing.AsposeDrawing.License drawingLic = new System.Drawing.AsposeDrawing.License();
imagingLic.SetLicense("license.lic");
drawingLic.SetLicense("license.lic");
using (var image = (RasterImage)Image.Load("sample2.jpg"))
{
    var settings = new BlobCounterSettings
    {
        FilterBlobs = true,
        MinHeight = 10,
        MinWidth = 10,
        Order = BlobsOrder.Size
    };

    var blobs = image.DetectBlobs(settings, image.Bounds);
    var blob = blobs[0];
    using (var b = blob.GetImage(false))
    {
        b.Save("result.png");
    }
}

Corner Detector


    Aspose.Imaging.License imagingLic = new License();
    System.Drawing.AsposeDrawing.License drawingLic = new System.Drawing.AsposeDrawing.License();
    imagingLic.SetLicense("license.lic");
    drawingLic.SetLicense("license.lic");

    using (var image = (RasterImage)Image.Load("polygons.cdr.png"))
    {
        var bounds = image.Bounds;
        var points = image.CornersDetector(bounds, new MoravecCornerDetectorSettings());
        AddCornersToImage(image, points);
        image.Save("result.png");
    }

    void AddCornersToImage(RasterImage image, List<Point> points)
    {
        var graphics = new Graphics(image);
        var pen = new Pen(Color.Red, 1);
        for (var i = 0; i < points.Count; i++)
        {
            var point = points[i];
            var rect = new Rectangle(point.X - 1, point.Y - 1, 2, 2);
            graphics.DrawArc(pen, rect, 0, 360);
        }
    }

Exhaustive block matching


    using (var image = (RasterImage)Image.Load("polygons.cdr.png"))
    using (var tmp = (RasterImage)Image.Load("template.png"))
    {
        var similarity = image.ExhaustiveTemplateMatching(0.5f, tmp);
        Console.WriteLine(similarity);
    }

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.Compatibility metadata lists 1 target framework; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.