If I've any m x n
logical image of a white region like the following:
How to get the indices of the boundary line between the white and black regions?
This simply comes down to detecting the edges of the given image. MATLAB already has a built-in implementation for that in the edge
command. Here's an example of detecting the boundaries of an image I
using the Canny filter:
A = edge(I, 'canny');
The non-zero elements in the resulting image A
are what you're after. You can then use find
to obtain their indices.