白色像素聚类提取 [英] white pixels cluster extraction

查看:144
本文介绍了白色像素聚类提取的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在进行指纹毛孔提取项目并且停留在毛孔的最后阶段(白色像素簇)提取。我有两个输出图像,我们将从中获得毛孔,但不知道如何去做..这两个图像的大小不同。图像大小为240 * 320,图像大小为230 * 310 ..这是我的图像..

I am working on a fingerprint pore extraction project and stuck at the last stage of pore (white pixels clusters) extraction..I am having two output images from which we will get the pores but don't know how to do it..also the two images are of different size..image1 of size 240*320 and image2 is of size 230*310 ..here are my images..

           image 1 (240*320)                         image2 (230*310)

这是我正在做的提取白色毛孔簇...

here is what i am doing to extract white clusters of pores..

for i = 1:230 
    for j = 1:310
        if image1(i,j)==1 && image2(i,j)==1
            result(i,j)=1;
        else
            result(i,j)= 0;
        end;
    end;
end;
figure(4);imshow(result,[]);

这是我的输出

      output (230*310)            expected (different than input image)

< img src =https://i.stack.imgur.com/sa350.jpgalt =在此处输入图像说明>

图像3(输出)显示上面代码生成的图像..这些错误可能是由于两个图像的大小不同而导致的想...所以我该怎么做才能得到毛孔(白色簇)..请注意,第四张图像(预期)与输入图像不同,只是为了向您展示输出的样子......提前感谢。 。

image 3 (output) shows the resultant image from above code ..these errors are may be due to difference in size of two images i think...so what should i do to get the pores(white clusters)..Note that fourth image (expected) is different than the input images just to show you what should be the output look like...thanks in advance..

推荐答案

我之前完成了这种类型的特征提取。通常情况下我是如何看待它的(我在过去曾在一家公司做过这个过程的发明者)是:

I have done this "type" of feature extraction before. Normally how I have seen it done (and I was somewhat the inventor of this process at a company I worked for in the past) was:

1D Blob检测:


  • 从左到右(或从右到左)逐像素地移动每一行

  • 如果您从黑色像素移动到其右侧的像素,您将转换为白色定义(由阈值设置),然后标记该点

  • 从黑色到白色的过渡,你现在集中搜索白色到黑色的过渡

  • 当找到白色到黑色时,将黑色到白色的过渡边界和白色到黑色的过渡边界配对成(我称之为)1D blob并存储在1D Blob列表中

  • Move through each row pixel by pixel from left to right (or from right to left)
  • if you move from a black pixel to a pixel right of it where you transition into your definition of white (as set by a threshold), then mark that point
  • from a black to white transition, you now concentrate your search for a white to black transition
  • when white to black is found, pair the black to white transition boundary and white to black transition boundary into (what I call) a "1D blob" and store in a list of 1D Blobs

2D Blob相关性:


  • 现在获得1D Blob列表后,需要通过查找1D Blob来将1D Blob关联到2D blob中相邻

您可以通过多种不同的方式定义边界:

You CAN define a boundary many different ways:


  • 二进制决定像素是否高于或低于阈值(最简单,最快)

  • 转换的底部,中间或顶部,转换速度可能从黑到白/白到黑或快(这称为瞬态响应),也称为您正在寻找的斜率

在您的情况下,它看起来就像您的图像是真正的二进制(黑色和白色没有灰色阴影),所以二进制阈值将工作得很好。

In your case it LOOKS as if your images are truly binary (black and white without gray shades), so binary thresholding will work just fine.

这篇关于白色像素聚类提取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆