Intensity weighted length measurement

Hi,
I have an image of single DNA molecules stretched onto a surface (See attached image). As one can see, some look more uniformly stretched and others are not (based on the uniformity in intensity). I would like to measure the end-to-end length of each molecule, by providing a weighting factor based on the intensity of each bright pixel of the molecule. I think "skeletonization" followed by using a "bounding box" to separate each molecule and then calculating intensity of "bright pixels" of each molecule followed by "intensity weighting" might help. Although I have this rough idea, I am a novice in matlab and not know how to exactly get the intensity of bright pixels alone in the region of selection followed by doing a weighting. Also, I am afraid if Skeletonization might get rid of some valuable information (especially in molecules that are less stretched), so a better way to perform the length measurement would be nice. Any hints, help in putting the code together will be appreciated.
Have a good day!!!
Ram...

1 Comment

Thanks a lot Walter. I will give it a try and will get back with the results soon.
Good day!!!

Sign in to comment.

 Accepted Answer

Walter Roberson
Walter Roberson on 7 Sep 2015
Edited: Walter Roberson on 7 Sep 2015
You do not need the skeletonization step. regionprops() 'BoundingBox' to find the bounding box, extract that portion from the image, and multiply it by regionprops() 'Image' to get a sub image that has 0 for the pixels that are not part of the blob.
For calculating the weighted distance, I suggest you try graydist() . To get the input matrix, take your uint8 grayscale image and use it to index your table of weighting factors (or calculate it more directly if the factors can be calculated by formula), producing a matrix of double of the weighting factors. Then graydist() the result like the example in the graydist() documentation. If my thought processes are correct, the result at either endpoint pixel should be the weighted distance.

1 Comment

Thanks a lot for your suggestions Walter. I will try it out and get back soon with the results.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!