MATLAB Answers

Track muscle tissue displacement by segmentati​on/morphol​ogical processing in video

조회 수: 11(최근 30일)
SP 24 Jul 2016
편집: SP 11 Aug 2016
이 질문에 1명의 참여자가 플래그를 지정함
I have a video of a microscopic size muscle tissue contracting and I have to track the displacement. I am trying to track a point by segmenting the cantilever that stretches the muscle and using the furthest right point of the cantilever (the point closest to the muscle tissue) to track that coordinate frame by frame. The problem is, when I run the program frame by frame the segmentation is not consistent enough throughout every frame. I am currently trying these steps to get my final image for each frame:
  1. manual threshold to threshold only the cantilever in the image (Otsu's created for many objects)
  2. dilating
  3. filling
  4. eroding
  5. using stats to find the furthest x point of the one object in the image
I need help with either optimizing my segmentation/morphological processing or a completely different way of tracking displacement frame by frame for the video.

  댓글 수: 0

로그인 to comment.

채택된 답변

Image Analyst
Image Analyst 24 Jul 2016
Can you indicate the cantilever, and the point on it that you are trying to find?
And also explain this: "using stats to find the furthest x point of the one object in the image" What "stats" are you using? What is the "one object"? Is it the cantilever? Are you just trying to find the rightmost column of the black finger-like thing? Have you considered just getting the coordinates and then (in post processing) filtering/smoothing the locations along the z direction so that it does not move too much from one frame to the next?

  댓글 수: 3

SP 25 Jul 2016
I have uploaded a picture where there is a green square that denotes the point I find and am tracking. I have also added the data I get from the point found for every frame. As you can see the x values (blue) are consistent but the y values (red) are dependent on the x values and are not consistent at all. It changes every frame because the thresholding changes every frame. I am using PixelList to find the max x point which is pretty consistent, and the y value is simply the y value associated with the x coordinate. The one object is the cantilever, after I threshold, and change to binary, there is only one object left when I look at 'Area' under stats. Yes, right most column of black finger-like thing.
I have considered either A) optimizing my threshold better or B) somehow finding y values independently of x C) post processing data as you mentioned.
I would love any examples or ideas you have as to either optimize the segmentation, post process the data (I don't know how to filter/smooth the data), or a completely different way to track displacement.
Image Analyst
Image Analyst 25 Jul 2016
You can use activecontour() or sgolayfilt() to smooth out the boundaries and make it less sensitive to noise. I'm attaching demos for each of those.
You don't need to computer PixelList, though you can. I'd probably ask for the bounding box.
You're manually thresholding it which should get you a good threshold but you don't remember necessarily what the prior thresholds were. You might start out with your prior threshold and then maybe limit the new threshold to be within a few gray levels of the prior threshold so it doesn't vary too drastically.
See my interactive visual threshold app in my File Exchange: It may make it easier for you to threshold.
I don't think the y values matter at all if you're just looking for the right edge of the bounding box, so I don't know why you mentioned the y values or are concerned about them.
I fixed your link. In the future, enclose your URL in angle brackets href = ""</a> to make it a clickable link.
SP 26 Jul 2016

1) I would use activecontour() or sgolayfilt() after I threshold, dilate, fill, erode...then activecontour() or sgolayfilt() or when should I implement the functions?

2) I looked up boundingbox, and I am not sure how I would use that to track a single pixel point furthest right of the object?

3) The manual threshold is set to 30 (intensity of the cantilever) for the entire video/program, how would I limit each threshold based on the previous threshold?

4) The y value matters because the cantilever moves in a diagonal format so I need x and y values so I can find displacement = sqrt((x2-x1)^2+(y2-y1)^2) of the high and low peaks of every period.

I have attached the link again and added my code and the video I am using. The code is well commented, but if you have any questions please ask. I truly appreciate all your help. These last questions should clear up everything.

로그인 to comment.

추가 답변(0개)

이 질문에 답변하려면 로그인을(를) 수행하십시오.

Translated by