Distinguish between chains

조회 수: 7 (최근 30일)
Stephen Morris
Stephen Morris 2011년 7월 18일
[EDIT: 20110718 16:11 - include images - WDR]
I need to be able to distinguish between to beaded chains that are lying next to each other. I can already find the location of each bead but I do not know how I can automatically determine which chain each bead belongs to. It is important that both chains are physically the same so I can't do to different colours.
Here are some sample images (raw b/w picture, filtered to show the beads, center of each bead marked): http://imageshack.us/g/405/testymh.jpg/
Any ideas?
  댓글 수: 9
Sean de Wolski
Sean de Wolski 2011년 7월 19일
I disagree. None of those angles are very large. A small displacement assumption and some rotation of the thread in relation to the bead, would account for the range of declinations available/visible while keeping the thread elastically strained/rotated.
Justin Bondy
Justin Bondy 2011년 7월 19일
The beads of the same chain can infact touch. The beads are hollow and the thread just goes into them. Sorry I did not make this clear.

댓글을 달려면 로그인하십시오.

답변 (2개)

Walter Roberson
Walter Roberson 2011년 7월 18일
Insufficient information about your premises. Do chains ever cross? Do they ever fork?
If they never cross and never fork, then in the simpler case, imdilate() to get a continuous line, threshold, bwboundary with no holes. That will get you the outer chain contour.
I indicate this as the "simpler case" in that this approach does not, without modification, consider the possibility of the chain ending. Having the chain end "in the middle of the picture" is something that is possibly tractable. If, though, a chain might end exactly where it touches another chain, then determining which chain is which might be difficult.
Can there ever be three chains in the image? Three chains that all happen to end at the same area? Is the threading definitely not captured in the images?
  댓글 수: 5
Walter Roberson
Walter Roberson 2011년 7월 19일
That's what I was afraid of when you said "magnetic": if the "beads" are magnetic then there are a large number of "chains", with every "bead" along the area the chains touch potentially belonging to multiple chains (since, after-all, the magnetic attraction of the _all_ the touching beads helps reinforce the cohesiveness.)
Easier if there is a physical thread that just doesn't happen to show up at the resolution or imaging modality...
Sean de Wolski
Sean de Wolski 2011년 7월 19일
@Walter: Your using the boundaries idea is good but the concave part where the outer boundary is the inner chain at the bottom-right hand corner would fail it.
@Justin: How much control do you have over the image acquisition system? I would recommend trying to get zoomed in on the chains. Even if they're close and touching; I think it would be much easier if we could see the linkage and have it actually distinguishable.

댓글을 달려면 로그인하십시오.


Justin Bondy
Justin Bondy 2011년 7월 19일
Sorry about the lack of info. The chains should never cross and (for now) they will not fork (though eventually I intend to use looped chains).
They are not magnetic chains, but the threading does not easily show up in the images. I am working to try and get them to show up more. You can see a picture where they show up here http://img219.imageshack.us/img219/8585/test2oi.jpg
I will play around with imdilate() and see if it helps.
Thanks
  댓글 수: 6
Walter Roberson
Walter Roberson 2011년 7월 19일
Draw straight lines across the image and use parity counting. When done horizontally and vertically you should be able to distinguish whether a vertical crossing count of 2 indicates you have crossed a loop of a single chain vs having crossed both chains once.
Justin Bondy
Justin Bondy 2011년 7월 19일
@Walter I don't think I understand what you mean by parity counting. Do you mean create a grid on the image and have each line return how many objects (beads) it encountered?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by