MATLAB: Active Contour run time warning

digital image processingImage Processing Toolboximage segmentation

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)

Best Answer

@Image Analyst, thank you so much for your reply. Exactly, My problem is the same as you described in https://www.mathworks.com/matlabcentral/answers/705903-active-contour-run-time-warning#comment_1240593.
According to my understanding, if you increase the number of iteration then you will get the accurate final outer boundary of the object in the "Original Grayscale Image".
But, I don't have problem about the contour segmentation. Please help me with my problem. If I use 400 number of iterations, the contour segmentation process stops before than 400 iterations and it generates the 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)