# Find area and perimeters of labeled segments for binary image

**URL:** <https://discourse.julialang.org/t/find-area-and-perimeters-of-labeled-segments-for-binary-image/124552>\
**Category:** Signal and Image Processing\
**Tags:** question, segmentation\
**Created:** [January 8, 2025, 8:18pm UTC](https://discourse.julialang.org/t/find-area-and-perimeters-of-labeled-segments-for-binary-image/124552 "2025-01-08T20:18:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Milns](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alex_milns/32/214593_2.png) [@Alex\_Milns](https://discourse.julialang.org/u/Alex_Milns)\
**Post date:** [January 8, 2025, 8:18pm UTC](https://discourse.julialang.org/t/find-area-and-perimeters-of-labeled-segments-for-binary-image/124552/1 "2025-01-08T20:18:07Z")

</div>

Hi! I try to calculate area and perimeters of labeled regions of binary image. For example:

```julia
using Images, ImageView, ImageSegmentation, TestImages, IndirectArrays, ImageMorphology
img = testimage("blobs")
# f = AdaptiveThreshold(window_size = 512)
f = Otsu()
imgbin = binarize(img, f);

seg = fast_scanning(imgbin, 0.2);
labels_map(seg);

```

Maybe, this question is trivial, but in offical docs and other post in stackoverflow or here I couldn’t find answer of this topic.

_ **How to evalute this regions geometrical propertires?** _

---

<div class="post-metadata">

**Author:** ![schrpe](https://avatars.discourse-cdn.com/v4/letter/s/f19dbf/32.png) [@schrpe](https://discourse.julialang.org/u/schrpe)\
**Post date:** [June 1, 2026, 3:17pm UTC](https://discourse.julialang.org/t/find-area-and-perimeters-of-labeled-segments-for-binary-image/124552/2 "2026-06-01T15:17:39Z")

</div>

Mi answer is possibly late but have a look at the Regions.jl package.

---

<div class="post-metadata">

**Author:** ![blah\_blah.jl](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/blah_blah.jl/32/223304_2.png) [@blah\_blah.jl](https://discourse.julialang.org/u/blah_blah.jl)\
**Post date:** [August 10, 2026, 12:53pm UTC](https://discourse.julialang.org/t/find-area-and-perimeters-of-labeled-segments-for-binary-image/124552/3 "2026-08-10T12:53:56Z")

</div>

Maybe take a laplacian or sobel operator to get a better idea of the borders from there you can go ahead

---

<div class="post-metadata">

**Author:** ![daniel\_watkins](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/daniel_watkins/32/224202_2.png) [@daniel\_watkins](https://discourse.julialang.org/u/daniel_watkins)\
**Post date:** [September 19, 2026, 2:11am UTC](https://discourse.julialang.org/t/find-area-and-perimeters-of-labeled-segments-for-binary-image/124552/4 "2026-09-19T02:11:29Z")

</div>

There are a handful of methods in ImageMorphology.jl for characterizing connected components in an image. I wanted something that organized the region features in the same way that the region props table works in SciKit Image in python, so my colleagues and I developed some tools to at least get some of the basic measures. See the `regionprops` and `regionprops_table` functions in IceFloeTracker.jl. Source code here: [https://github.com/WilhelmusLab/IceFloeTracker.jl/blob/main/src/Segmentation/regionprops.jl](https://github.com/WilhelmusLab/IceFloeTracker.jl/blob/main/src/Segmentation/regionprops.jl). At some point we will likely make a pull request for one of the other JuliaImages libraries but I’m not sure yet which one it would make the most sense in.
