aforge 学习-基本图像处理要用的类库

1.图像灰度化:Grayscale.CommonAlgorithms.BT709(3种)

FiltersSequence =new  FiltersSequence(数组处理函数);

2.二值化(阈值化)将灰度图像转换为黑白图像,用于识别轮廓。

Threshold 等类 t filter = new Thd( 颜色值 );

filter.ApplyInPlace( image );

3.二值图像后,再用BLOB处理法检测 要处理的区域分离出来

BlobCounter 对象

BlobCounter类数和提取图像中独立对象使用连接组件标记算法。
    注意:算法对所有像素值小于等于BackgroundThreshold为背景,但较高的像素值作为对象的像素。
    blob的搜索类支持8 bpp索引灰度图像和24/32   bpp至少两个像素的彩色图像。图像的一个像素宽可以处理如果他们先旋转,或与RecursiveBlobCounter处理它们。

// create an instance of blob   counter algorithm
    BlobCounter bc = new BlobCounter( );
    // process binary image
    bc.ProcessImage( image );
    Rectangle[] rects = bc.GetObjectsRectangles( );
    // process blobs
    foreach ( Rectangle rect in rects )
    {
        // ...
    }
   

 

 对象.FilterBlobs =true;

MinWidth ,MinHeight MaxWidth MaxHeight设定。

GetObjectsInformation()方法得到所有图块的信息(边缘点、矩形区域、中心点、面积、完整度,等等),

GetBlobsEdgePoints(blob);PointsCloud

利用Set of tools for processing collection of points in 2D space.The static class contains set of routines, which provide different operations
with collection of points in 2D space. For example, finding the furthest point
from a specified point or line.(在二维空间中处理点集合的工具集。静态类包含一组例程,它们提供不同的操作在二维空间中收集点。例如,找到最遥远的点从指定的点或线。)

如果只需要图块的边缘点来计算矩形区域中心点,并通过调用PointsCloud.FindQuadriteralCorners函数来计算之。

图像进行矫正变换  ResizeBilinear

Resize image using bilinear interpolation algorithm.

 

转载于:https://www.cnblogs.com/nulidemaomaochong/p/8278363.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值