gpt4 book ai didi

c# - 是否可以使用 Blob 分析删除图像的小块?

转载 作者:太空宇宙 更新时间:2023-11-03 13:57:42 24 4
gpt4 key购买 nike

我想知道 blob 究竟是什么?是否可以减少图像中的背景噪音?或者是否有可能在图像中找到最大的区域,更具体地说,如果图像只包含手部和头部片段,那么是否可以只分离手部或头部区域? 如果这是可能的,那么也可以选择具有较大轮廓的边界,同时消除图像中的小块 ??

Suggest me, i have an image containing hand gesture only. I used skin detection technique to do so. But the problem is i have small other noises in the image that have same color as hand(SKIN). I want typical hand gestures only, with removed noises. Help me??

Here is a sample Image in which i want to remove noises behind hand contour.

最佳答案

使用 example from aforge ,您有什么理由不能只清除图像中的小部分?

// create an instance of blob counter algorithm
BlobCounterBase bc = new ...
// set filtering options
bc.FilterBlobs = true;
bc.MinWidth = 5;
bc.MinHeight = 5;
// process binary image
bc.ProcessImage( image );
Blob[] blobs = bc.GetObjects( image, false );
// process blobs
var rectanglesToClear = from blob in blobs select blob.Rectangle;

using (var gfx = Graphics.FromImage(image))
{
foreach(var rect in rectanglesToClear)
{
if (rect.Height < someMaxHeight && rect.Width < someMaxWidth)
gfx.FillRectangle(Brushes.Black, rect);
}
gfx.Flush();
}

关于c# - 是否可以使用 Blob 分析删除图像的小块?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11632293/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com