# Bwareaopen in Julia?

**URL:** <https://discourse.julialang.org/t/bwareaopen-in-julia/110603>\
**Category:** General Usage\
**Created:** [February 22, 2024, 7:27pm UTC](https://discourse.julialang.org/t/bwareaopen-in-julia/110603 "2024-02-22T19:27:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [February 22, 2024, 7:27pm UTC](https://discourse.julialang.org/t/bwareaopen-in-julia/110603/1 "2024-02-22T19:27:08Z")

</div>

Hi, I’ve searched (basically, _googled_ it) but could not find one, thought I’m convinced that id does exist. Anyone knows how to do what Matlab’s [bwareaopen](https://www.mathworks.com/help/images/ref/bwareaopen.html) does?

Thanks.

---

<div class="post-metadata">

**Author:** ![mihalybaci](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mihalybaci/32/13528_2.png) [@mihalybaci](https://discourse.julialang.org/u/mihalybaci)\
**Post date:** [February 22, 2024, 7:38pm UTC](https://discourse.julialang.org/t/bwareaopen-in-julia/110603/2 "2024-02-22T19:38:04Z")

</div>

That looks really similar to the `remove_small_objects` function in SciKit-Image that I’ve used for doing watershed segmentation. Maybe ImageSegmentation.jl will have a similar function?

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [February 22, 2024, 8:12pm UTC](https://discourse.julialang.org/t/bwareaopen-in-julia/110603/3 "2024-02-22T20:12:06Z")

</div>

Thanks, but can’t find one there.

---

<div class="post-metadata">

**Author:** ![Fliks](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fliks/32/2494_2.png) [@Fliks](https://discourse.julialang.org/u/Fliks)\
**Post date:** [February 22, 2024, 9:24pm UTC](https://discourse.julialang.org/t/bwareaopen-in-julia/110603/4 "2024-02-22T21:24:45Z")

</div>

You can use the functions from ImageMorphology and here especially the `area_opening` function

[https://juliaimages.org/ImageMorphology.jl/stable/reference/#ImageMorphology.area\_opening](https://juliaimages.org/ImageMorphology.jl/stable/reference/#ImageMorphology.area_opening)

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [February 22, 2024, 11:04pm UTC](https://discourse.julialang.org/t/bwareaopen-in-julia/110603/5 "2024-02-22T23:04:14Z")

</div>

Thanks, that’s indeed what I was looking for.
