How to trace (detect) the boundary changing under compression?
3 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(2 个)
Neuropragmatist
2019-8-6
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 个评论
Neuropragmatist
2019-8-7
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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/233036/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.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!