How to trace (detect) the boundary changing under compression?

1 view (last 30 days)
Hello everybody
I have attached the sample image. I would like the detect the outer boundary of the elastic object under compression. I have attemed to do that using blob measurement. In this case I could calculate the perimeter of the outer boundary. However under compression, the outer and inner boundary are getting mixed which I only wish the trace the outer boundary. In this case , blob measurment is getting failed. Can anyoone help me or sugges me a method to trace the boundary of the elastic object?
Thanks in advance.

Answers (2)

Neuropragmatist
Neuropragmatist on 6 Aug 2019
It seems like you have 3 regions; a light background a darker inner ring and then a really dark core.
You want to detect the inner ring but your function keeps mixing it up with the dark core? That just seems like a thresholding problem, why doesn't lowering your threshold work?
Can you give us an example of an image where your code did not work? And also maybe the code you are trying to use?
  1 Comment
Neuropragmatist
Neuropragmatist on 7 Aug 2019
I think this will be a very difficult problem to solve, at first I thought we could use stdfilt or entropyfilt to find the regions in focus (i.e. the foreground) but they just aren't sensitive enough.
The farthest I got was this:
I = rgb2gray(imread('02.jpg'));
BW = edge(I,'Canny',[.15 .8]);
figure
subplot(2,2,1)
imshow(BW)
subplot(2,2,2)
SE = strel('disk',10);
IM2 = imdilate(BW,SE);
IM2 = imerode(IM2,SE);
imshow(IM2)
untitled.png
I know I can get the outer boundary by finding the convex hull but I have no idea how to then find the little section on the right.
If you are lucky Image Analyst will drop by and look at your problem, but I don't think I can help you any further. Image analyst would probably suggest edge linking though to complete the lines in the images above:
Then the regions could be easily labelled using bwlabel.
Sorry I can't be more help,
M.

Sign in to comment.


engineer
engineer on 8 Aug 2019
Thanks for your contribution. Just to make it clearer, I am not trying to find the perimeter of the little section on the right, I am trying to find the perimeter of the big section on the left, which the shape is like a bean.
I hope that Image Analyst can see us and look at our problem.
Thanks alot!!!

Community Treasure Hunt

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

Start Hunting!