MATLAB Answers

How can I form a perimeter of variable thickness

9 views (last 30 days)
Scrat on 5 Sep 2015
Commented: Scrat on 10 Sep 2015
I have a bw image with the largest area of a mouse cell. how can i get a perimeter with a variable thickness so that i can get a ring like border and i can manipulate the thickness as per wish. i have used bwperim but it only gives a very thin outline. What i want is that but thick and also i want to control the thickness. Thanks


Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 5 Sep 2015
Call imdilate() on the image you get from bwperim().


Show 2 older comments
Scrat on 10 Sep 2015
I have applied imdilate() with a disk filter of radius 5 so that a ring of 5pixel thick forms. But the problem is it increases on both side of the perimeter. What I wanted is to increase the perimeter only towards the centroid so that i can measure the cell density in different edge thickness of the cell area. How can I achieve that?
Image Analyst
Image Analyst on 10 Sep 2015
Did you read my prior comment? I told you how to do that. Another way is to simply call imerode() on the original binary image - the one you used when you called bwperim(). Just eat away the outer layers 2 or 5 pixels.
Scrat on 10 Sep 2015
Thanks a lot...that is exactly what i was looking for!!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by