How can I count the connections between different colored particles?

4 ビュー (過去 30 日間)
DombovariD
DombovariD 2018 年 6 月 27 日
回答済み: DombovariD 2018 年 7 月 11 日
I have a project, where I have to follow the homogeneity of a particle bed during mixing. For this, I chose the contact method: the more contacts between different colored particles, the more the bed becomes homogeneous. I already reduced the picture to 3 colors: the background is black and the two type of particles are red and white. I appreciate every answer, thank you!
  6 件のコメント
Guillaume
Guillaume 2018 年 6 月 28 日
Can you confirm that you only want to count the points of contact between different coloured particles, not the same colour.
What is the definition of a point of contact? If a red blob touches a red blob at 3 adjacent pixels, is it 3 point of contacts?
DombovariD
DombovariD 2018 年 6 月 28 日
Yes, I confirm that. So if two red particles touch at any number of points, it shouldn't be counted, but between a red and a white, if they connect on multiple pixels, I just want it to be counted as one contact point.

サインインしてコメントする。

回答 (2 件)

Elliott Gorman
Elliott Gorman 2018 年 7 月 10 日
Just an idea, but what if you checked if there are different colors, other than the red and white where particles have collided? I'm thinking, when the red and white overlap, they should amalgamate to create a pinkish color, no? Or does one particle simply overwrite the other? When they contact, I'd imagine there would be a point at which those two separate colors interact. If you could count not the incidents, but the number of times this specific range of colors (pinkish) comes up, then should that not be what you are looking for?
  1 件のコメント
DombovariD
DombovariD 2018 年 7 月 11 日
there's no overlap, but thanks for your idea! another problem is, that it would also count the shadows(maybe).

サインインしてコメントする。


DombovariD
DombovariD 2018 年 7 月 11 日
I've found my way, however, not how I first thought. 1. convert to binary image ( im2bw ) 2. define particle size 3. filter smaller parts ( uint8(bwareaopen(BW, particlesize)) ) 4. fill in gaps, where the shadows messed up the picture ( imfill(BW1filtered,'holes') ) 5. ask for the boundaries ( bwboundaries(BW1filled); numberOfBoundaries1 = size(boundaries, 1) ) this gave me the number of boundaries found on the picture, which is perfect for me. Also, i plotted them on the original pictures (attached).
This demo helped me a lot in achieving this by Image Analyst: https://www.mathworks.com/matlabcentral/fileexchange/25157-image-segmentation-tutorial

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

製品


リリース

R2014a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by