From: A on
hi,
i have a matrix in which certain points are marked with '-9999',
representing invalid points. For ex:

-9999 1 2 3 4 -9999 -9999
-9999 -9999 2 3 10 14 -9999
....
.....

Now, I have to find the boundary points of this irregular shape (which
is formed by removing these -9999's). I was told, its the problem of
finding the non-convex hull of a set of points. In Matlab, I am able
to calculate the convex hull, but how to compute the non-convex hull ?

thank you.
From: ImageAnalyst on
What you need to do is to threshold the object and then call
bwboundaries() or bwperim() depending on what you want as a result.

binaryImage = originalImage ~= -9999;
% Now call bwboundaries or bwperim on binaryImage.
From: A on
On Apr 5, 1:21 am, ImageAnalyst <imageanal...(a)mailinator.com> wrote:
> What you need to do is to threshold the object and then call
> bwboundaries() or bwperim() depending on what you want as a result.
>
> binaryImage = originalImage ~= -9999;
> % Now call bwboundaries or bwperim on binaryImage.

hi ImageAnalyst,
Thank you for your suggestion, but I think its not quite what I
want... Please have a look at the image here.
http://img100.imageshack.us/img100/8382/boundaries.png

My objective is to locate the boundaries of the points as shown here
and obtain its "coordinates". If its still could be achieved using the
functions you mentioned, then could you explain it once more, because
I tried both bwboundaries and bwperim and I couldn't arrive at this
point.

thank you.
From: ImageAnalyst on
Well, show your code, including code to generate that
array, ...because I think those functions are exactly what you want.
From: A on
On Apr 5, 5:27 am, ImageAnalyst <imageanal...(a)mailinator.com> wrote:
> Well, show your code, including code to generate that
> array, ...because I think those functions are exactly what you want.

Hi ImageAnalyst,
I managed to do it. Thank you very much... Works like a charm!