# Is there way to measure the width of a binary mask along its length?

**URL:** <https://forum.opencv.org/t/is-there-way-to-measure-the-width-of-a-binary-mask-along-its-length/10581>\
**Category:** Python\
**Created:** [October 17, 2022, 3:22pm UTC](https://forum.opencv.org/t/is-there-way-to-measure-the-width-of-a-binary-mask-along-its-length/10581 "2022-10-17T15:22:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kvusvr](https://avatars.discourse-cdn.com/v4/letter/k/6bbea6/32.png) [@kvusvr](https://forum.opencv.org/u/kvusvr)\
**Post date:** [October 17, 2022, 3:22pm UTC](https://forum.opencv.org/t/is-there-way-to-measure-the-width-of-a-binary-mask-along-its-length/10581/1 "2022-10-17T15:22:16Z")

</div>

I have this binary image here:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/a/a12faac417b895ae11cd836ceb1522f650f58bda.png)

I am trying to measure the width of the shape along the entire length of the shape.

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [October 17, 2022, 7:01pm UTC](https://forum.opencv.org/t/is-there-way-to-measure-the-width-of-a-binary-mask-along-its-length/10581/2 "2022-10-17T19:01:13Z")

</div>

related:

> <https://stackoverflow.com/questions/74095775/is-there-way-to-measure-the-width-of-a-binary-mask-along-its-length-using-opencv>

---

<div class="post-metadata">

**Author:** ![laurent.berger](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@laurent.berger](https://forum.opencv.org/u/laurent.berger)\
**Post date:** [October 18, 2022, 7:18am UTC](https://forum.opencv.org/t/is-there-way-to-measure-the-width-of-a-binary-mask-along-its-length/10581/3 "2022-10-18T07:18:04Z")

</div>

Hi,

> [@kvusvr](#):
>
> I am trying to measure the width of the shape along the entire length of the shape.

may be this [old post](https://answers.opencv.org/question/174300/how-to-determine-length-of-spline-eg-snake/) can help you
