92 views (last 30 days)

Hi

I have a binary image which I have extracted the perimeter with bwperim() function. Now that I have the perimeter image I am trying to extract the coordinates of pixels in this perimeter.Here are the images:

The white perimeter illustrated in the second image is where I want to find the coordinates. Any Suggestions is appreciated.

Thanks

Dishant Arora
on 1 Apr 2014

If you have a single blob the above answer would suffice but in case you have multiple objects use bwboundaries. It gives you the coordinates of boundary pixels.

doc bwboundaries

Dishant Arora
on 1 Apr 2014

Image Analyst
on 1 Apr 2014

Sign in to comment.

Arriana Nwodu
on 13 Aug 2018

So which code is correct? I tried all the ways listed and it didn't work

Sign in to comment.

Sign in to answer this question.

Opportunities for recent engineering grads.

Apply Today
## 3 Comments

## Direct link to this comment

https://se.mathworks.com/matlabcentral/answers/123943-how-can-i-find-pixel-coordinates-of-a-perimeter-in-a-binary-image#comment_433801

⋮## Direct link to this comment

https://se.mathworks.com/matlabcentral/answers/123943-how-can-i-find-pixel-coordinates-of-a-perimeter-in-a-binary-image#comment_433801

## Direct link to this comment

https://se.mathworks.com/matlabcentral/answers/123943-how-can-i-find-pixel-coordinates-of-a-perimeter-in-a-binary-image#comment_433823

⋮## Direct link to this comment

https://se.mathworks.com/matlabcentral/answers/123943-how-can-i-find-pixel-coordinates-of-a-perimeter-in-a-binary-image#comment_433823

## Direct link to this comment

https://se.mathworks.com/matlabcentral/answers/123943-how-can-i-find-pixel-coordinates-of-a-perimeter-in-a-binary-image#comment_725789

⋮## Direct link to this comment

https://se.mathworks.com/matlabcentral/answers/123943-how-can-i-find-pixel-coordinates-of-a-perimeter-in-a-binary-image#comment_725789

Sign in to comment.