Active Contour run time warning
古いコメントを表示
Why I get a warning while using active contour in MATLAB?
Warning: Iterations terminated prematurely because no part of the contour lies within the image domain. If the range of pixel values in the input image is small (such as 0-1)
8 件のコメント
Adam Danz
2020 年 12 月 31 日
The warning tells you why it's appearing. We cannot explain why this is happening without more info such as the image, inputs to activecontour, etc.
Tamoor Aziz
2021 年 1 月 1 日
Adam Danz
2021 年 1 月 1 日
What is "Image"? I see that there's an attachment named Image.png and I assume the variable Image stores the image data of that file but how are you reading it in?
Since you're applying logical() I assume the image data are binary.
Tamoor Aziz
2021 年 1 月 2 日
Image Analyst
2021 年 1 月 2 日
Exactly? Do you mean that there is an exact solution? Where exactly is the border of that blurry smooth shape? Can you indicate it in a red curve? It looks like a judgment call to me. What about simply thresholding and calling bwboundary()?
boundary = bwboundaries(grayImage < someGrayLevel);
Adam Danz
2021 年 1 月 2 日
Now I have the same question for "BoundingBox". What is it? I understand it was created using mask.png and that it's probably a binary matrix but we can't be sure without having the line of code you used to read in that file and create 'BoundingBox'.
Image Analyst
2021 年 1 月 2 日
The mask is some initial shape for the activecontour() function. See my attached demo.

Adam Danz
2021 年 1 月 2 日
I'd like the OP to share how BoundinBox was created to eliminate that step as a possible cause of the problem and to ensure that we're identically replicating the problem. That would only be 2-3 lines from your demo,
grayImage = imread(fullFileName);
mask = grayImage > thresholdValue;
And for the composite mask,
mask = bwconvhull(mask, 'Union');
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Image Segmentation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!