AForge.NET

Testimonials
Features
Samples
Tools
Documentation
License
Downloads
Sources
Discussions
Partners
Projects
Members
Donate

AForge.NET Framework
2.2.5 version is available!

The page provides a list of main AForge.NET 2.0 Framework features, which is currently in development. The release date of the 2.0 version is not yet set, as well as the final list of its features. Some of the features below are already implemented and available in 2.0 development branch, but some are still under development. Any comments, ideas, suggestions are always welcome to the discussion board. Any features wishes are welcome to be registered as enhancement requests. Any help is welcome, as well as support.

  • First of all the 2.0 version will have improved documentation, which will be available not only off-line as CHM help file, as it was before, but also on-line. All classes of the framework are revisited to make sure they have proper and enough documentation, as well as small sample codes. In the case of any comments/issues, it is possible to provide feedback for any of the documentation page. Here it comes ...

  • Mono support. It has passes quite a while since the time it became possible to develop .NET applications not only for Windows, but for Linux and Mac operating systems. Taking into account the growing popularity of Mono and number of requests for AForge.NET availability on Linux, we would like to support it as well. Not all of the AForge.NET framework's libraries are going to be available under Linux, because of the fact that some of them rely on Win32 API usage. But most of the libraries are planned to become available for Mono developers.

  • Multi core/CPU support. Nowadays DualCore CPUs are getting to be quite common. Some lucky people even have access to greater amount of CPUs. If something exists, then there is a purpose for it and it is should be used. 2.0 version introduces support for parallel commutations, providing Parallel.For() routines, which makes it much simpler to parallel for-loops than implementing custom solution..

    In the case of expensive computations in terms of CPU time, instead of writing this:

    for ( int i = 0; i < 100; i++ )
    {
        // ...
    }
    

    we may write it a bit differently distributing computation across all cores/CPUs in the system:

    Parallel.For( 0, 100, delegate( int i )
    {
        // ...
    } );
    

    What is the boost? We'll demonstrate it on some simple calculations - multiplication of 250x250 matrixes (absolute numbers are milliseconds and are not that important since they depend on system, but performance increase in percents is more interesting):

    DualCore system:
    Starting test with 2 threads
    1288.000 | 735.000 |
    1280.000 | 717.000 |
    1276.000 | 718.000 |
    1287.000 | 717.000 |
    1276.000 | 720.000 |
    ----------- AVG -----------
    1281.400 | 721.400 |
    8 CPU system:
    Starting test with 8 threads
    1593.750 | 234.375 |
    1593.750 | 203.125 |
    1593.750 | 218.750 |
    1593.750 | 218.750 |
    1593.750 | 218.750 |
    ----------- AVG -----------
    1593.750 | 218.750 |

    Parallel.For() is provided as to applications, as used internally by some AForge.NET framework's routines. For example, some CPU expensive image processing routines may use it to speed up processing. All classes, which use parall computations have a special note in their documentation.

  • Support of images in unmanaged memory. Earlier versions of AForge.NET framework are able to do image processing of .NET's managed images only, which may slow down performance due to the fact that it is always required to lock image before image processing and unlock right after. It was also possible to do image processing of already locked images, but it was still hard to minimize amount of locks/unlocks. Also it was hard integrate AForge.NET's image processing routines with other libraries, which handle unmanaged image. 2.0 version brings support of unmanaged images via UnmanagedImage class, which is supported by all image processing routines.

    // wrap unmanaged image
    UnmanagedImage image = new UnmanagedImage(
            imageData, width, height, stride, pixelFormat );
    // create filter
    Sepia filter = new Sepia( );
    // apply the filter
    filter.ApplyInPlace( image );
    
  • Image processing filters provide a bit info about them. It is known that different image processing routines may handle only certain image formats, like color, grayscale, etc. Documentation for 2.0 version provides information about each image processing routine and its supported formats, but what if this needs to be checked during run time? 2.0 solves the issue for image processing filters by introducing IFilterInformation interface. Using it's FormatTransalations property it is possible to check which image formats are supported by certain filter and which format will be provided as a result of image processing:

    // create filter
    GrayscaleBT709 filter = new GrayscaleBT709( );
    // get IFilterInformation interface
    IFilterInformation info = (IFilterInformation) filter;
    // check if the filter supports our image's format
    if ( info.FormatTransalations.ContainsKey( image.PixelFormat )
    {
        // format is supported, check what will be result
        // of image processing
        PixelFormat resultingFormat =
            info.FormatTransalations[image.PixelFormat];
    }
    
  • More image formats are supported. Earlier versions of AForge.NET framework supported 2 image formats only ( 8 bpp grayscale/binary and 24 bpp color), which is not enough for many applications. Especially when it comes to medical and scientific data, where 16 bpp grayscale images are very popular. 2.0 version started solving this issue, providing support for wider range of formats, like 16 bpp grayscale, 32, 48, 64 bpp color images. Not all filters will support all of the image formats, but many different filters will do (although some may not be updated by 2.0 release). Support of the new pixel formats becomes available mainly due to the fact, that new base image processing classes are introduced, which do not restrict inheriting filters in the range of supported formats.

  • More namespaces, more new classes. The AForge.NET 2.0 introduces also some other stuff, like new namespaces, classes, etc., which are listed below: