white pixels cluster extraction

北战南征 提交于 2019-12-07 13:30:59

问题


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,[]);

here are my output

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

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..


回答1:


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 detection:

  • 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 correlation:

  • After you now have your list of 1D Blobs, you need to correlate the 1D Blobs into 2D blobs by looking for ones that are adjacent

You CAN define a boundary many different ways:

  • Binary decision of whether a pixel is above or below threshold value (easiest, and fastest)
  • bottom, mid, or top point of transition, where the transition could be slow from black-to-white / white-to-black or fast (this is called transient response), also known as the slope that you are looking for

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.



来源:https://stackoverflow.com/questions/22209308/white-pixels-cluster-extraction

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!