Distinguish between chains (Improved)

Hi, I asked a very similar question a few months ago but response was that I needed to improve my image acquisition before I worked on the problem further. My pictures are now much clearer so I thought I would ask again.
Basically I have a shaking table with two beaded chains (like the kind you pull to turn a lighbulb on) lying next to each other. The chains are visually identical and I am hoping to find a way to distinguish between the two of them. I have no problem finding the location of each bead, but I cannot determine (automatically) which chain each bead belongs to.
Some more info: I will be taking several hundred pictures for each run so I would like the process to be as automatic as possible. The chains are both linear (no forks) and should never cross over each other. The chains are a bunch of hollow nickel spheres with a thread running through them, which means that the distance between each bead can run anywhere from touching to about 1mm apart.
I am hoping that being able to see the threads between beads now will help make this happen
Here are some sample pictures of the kinds of images I will be taking:
Any help would be greatly appreciated!
Ps. is there a way to embed pictures directly into a post instead of linking to an external image hosting site

3 Commenti

There is currently no method to embed pictures directly without hosting them externally. You might want to add your vote to the appropriate item on the Wish-List, http://www.mathworks.com/matlabcentral/answers/994-wish-list-for-matlab-answer-sections
The information you put in to this question is much improved from your original question months ago.
Note: imageshack will display a scaled-down version of the image; click on the enlargement icon to get higher resolution.
I did not embed them in Justin's posting because too much of the original resolution picture is cut off when that is done.

Risposte (1)

Image Analyst
Image Analyst il 28 Set 2011

0 voti

As usual, it's much easier to solve the problem at the beginning - at the image acquisition - than at the end (the image analysis). The answer is very very simple: you just photograph one chain at a time. Then you know which ball is in which chain. By the way, is there a real world purpose for this, or is this just some kind of homework exercise for an image processing class? Because it doesn't seem like the industrial kinds of situations I run across.

7 Commenti

Difficult to photograph just one chain at a time when the two chains are on the same shaking table.
On the other hand, perhaps the chains could be colored differently. I glanced around a bit and it appears that pure nickel is not at all easy to color (at least not permanently), but some common alloys like nickel-chrome are apparently comparatively easy. The required wear cycle would probably turn out to be important: for shorter terms, magic marker might due, for mid terms, something like enamel might perhaps work. Partial wearing of the color would, after all, not be important in this matter.
As Walter said, I cannot just photograph one chain at a time since the experiment it all about how the chains interact with one another. They both must be present for the duration of the experiment, which is my Master's in Physics thesis btw.
As for coloring the chains we have tried a few things with little results. Permanent markers rubbed off very fast due to the shaking they experienced. I have some antiquing solution coming in the mail that should darken one of the chains so we will see how that goes. It is extremely important that anything I do to distinguish them does not affect their physical properties (using actual paint affected how they interacted with the shaking table).
Who cares how they interact? Again I'm asking what is the real world need for this? I'm not saying it's necessary for me to answer, I'm just curious. Are you able to capture the wires in between the balls? If you are, and the chains don't cross each other then it's trivial. So answer that and then also say whether the chains can cross or not. If you can't find the wires then it may not be possible to determine which balls belong to which chain without making some assumptions - think of the case of a perfect rectangular grid of closely packed, interlaced chains.
The Question indicates that the chains "should not" cross.
The threads (not wires) between the balls are more visible if you view the image full size. If (like me) you do not want to sign up for an imageshack account, then you can use your browser's "view image" capacity when positioned over the scaled image.
If he's able to get the threads between all the balls in the binary image, then he can just label it and he'll have two blobs - one for each chain. Then call regionprops asking for PixelList (a list of all the pixel x,y coordinates in the blob). Now he said he already has some code to find the centroid of each ball so it's a simple matter to see which blob the centroid is in - blob/chain #1 or blob/chain #2.
However I downloaded the image and it doesn't appear that a simple threshold will give a nice clean image. There are a lot of noise specks and the threads don't touch both balls on either side of the thread segment. So some custom preprocessing of the gray scale image will be required, and/or fixing/cleaning of the thresholded/binary image.
I'm still curious as to why the image capture situation can't be improved upon if this is a real world industrial situation, as opposed to some contrived practice exercise. Maybe it was explained in his previous response but that seems to not be on Answers or the newsgroup, at least not that I could find.
The purpose of all of this is my Masters of physics thesis. I am using the entropic separation of these chains, who are initially mixed, as an analog for the separation of polymers during division of e. coli cells.
Ya the main thing I think is a problem is that at certain points the beads from the second chain are touching the beads from the first so they kinda look like a continual object (like the beads and the thread should be). I am not sure how to further improve my image capture situation. I am already using the highest resolution camera I have available to me in my lab (Canon rebel t2i, 18-megapixel) and I am lighting the table withe a radial array of bright white LEDs
Can you post one of the actual images of "polymers during division of e. coli cells." I'd like to see how closely the chain analogy matches your real situation. Because there may be some real ad hoc things that you have to do for the chains that you might not have to do with the cells, like using crossed polarizers to eliminate specular reflections or something like that.

Questa domanda è chiusa.

Richiesto:

il 27 Set 2011

Chiuso:

il 20 Ago 2021

Community Treasure Hunt

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

Start Hunting!

Translated by