contour extraction from the image
이전 댓글 표시
Hi,
I have the image from which I need to extrat the outer contour. My image is saved in the matrix name h..(also .mat file is attached here)
I have tried as shown below, while executing the edge () function I am getting two profiles i.e. outer and inner boundary as shown in the attached figure (contour.bmp). However, my intrest is to extract only the outer boundary as marked with black lines in raw image.jpg
Could somebody help me on how to extract only the outer boundary??
% convert raw to binary image
rgb1 = imbinarize(h, 700);
imagesc(rgb1);
rgb2 = ind2rgb(rgb1,jet(2));
imagesc(rgb2);
grayimage = rgb2gray(rgb2);
imagesc(grayimage);
Edge = edge(grayimage);
imagesc(Edge);
채택된 답변
추가 답변 (1개)
Turbulence Analysis
2021년 6월 2일
0 개 추천
댓글 수: 3
Star Strider
2021년 6월 2일
I would save the vectors to a .mat file in each iteration. Give the vectors for each iteration a distinct name, perhaps creating a table for them with cell2table with a new name for the table in each iteration, then add them to the file as described in Append Variable to MAT-File to have a permenent record of them that is easily accessable. Creating the table and writing to the file would slow the code slightly, however the permanent record of all of them would likely be worth the effort.
Turbulence Analysis
2021년 6월 2일
Star Strider
2021년 6월 2일
Noted.
카테고리
도움말 센터 및 File Exchange에서 Polygons에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

