# How to contour extraction by stroke？

**URL:** <https://forum.opencv.org/t/how-to-contour-extraction-by-stroke/3276>\
**Category:** C++\
**Created:** [May 11, 2021, 1:27am UTC](https://forum.opencv.org/t/how-to-contour-extraction-by-stroke/3276 "2021-05-11T01:27:06Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![wulicheng](https://avatars.discourse-cdn.com/v4/letter/w/9de053/32.png) [@wulicheng](https://forum.opencv.org/u/wulicheng)\
**Post date:** [May 11, 2021, 1:27am UTC](https://forum.opencv.org/t/how-to-contour-extraction-by-stroke/3276/1 "2021-05-11T01:27:06Z")

</div>

![无标题](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/9/954a7c916a73f30d62e4e3d72364deac9a0ee5b4.jpeg)

How to extract the contour of the bone by draw points near the edge of the bone?

---

<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:** [May 11, 2021, 10:44am UTC](https://forum.opencv.org/t/how-to-contour-extraction-by-stroke/3276/2 "2021-05-11T10:44:51Z")

</div>

welcome.

please show your effort into solving your task.

related: [Contour matching and evaluation criteria？](https://forum.opencv.org/t/contour-matching-and-evaluation-criteria/3274)

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [May 11, 2021, 11:02am UTC](https://forum.opencv.org/t/how-to-contour-extraction-by-stroke/3276/3 "2021-05-11T11:02:43Z")

</div>

@wulicheng , did you mean something interactive, like snakes ?

---

<div class="post-metadata">

**Author:** ![wulicheng](https://avatars.discourse-cdn.com/v4/letter/w/9de053/32.png) [@wulicheng](https://forum.opencv.org/u/wulicheng)\
**Post date:** [May 13, 2021, 12:43am UTC](https://forum.opencv.org/t/how-to-contour-extraction-by-stroke/3276/4 "2021-05-13T00:43:33Z")

</div>

yes, I know snakes,but i do not have the code? Do you have source code?

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [May 13, 2021, 6:41am UTC](https://forum.opencv.org/t/how-to-contour-extraction-by-stroke/3276/5 "2021-05-13T06:41:00Z")

</div>

please take a look at [the contours tutorials](https://docs.opencv.org/master/df/d0d/tutorial_find_contours.html)

if you really need something interactive (i doubt so),  
there is also an [IntelligentScissors](https://docs.opencv.org/master/df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html#details) implementation

---

<div class="post-metadata">

**Author:** ![Yochanan\_Scharf](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/yochanan_scharf/32/1952_2.png) [@Yochanan\_Scharf](https://forum.opencv.org/u/Yochanan_Scharf)\
**Post date:** [May 19, 2021, 11:34am UTC](https://forum.opencv.org/t/how-to-contour-extraction-by-stroke/3276/6 "2021-05-19T11:34:32Z")

</div>

Try `CVUI` which is a great library supporting both `C++` and Python `OpenCV`.  
`CVUI` enables the fast prototyping of interactive applications using `OpenCV`.

> **[cvui](https://dovyski.github.io/cvui/)**
>
> A (very) simple UI lib built on top of OpenCV drawing primitives

---

<div class="post-metadata">

**Author:** ![wulicheng](https://avatars.discourse-cdn.com/v4/letter/w/9de053/32.png) [@wulicheng](https://forum.opencv.org/u/wulicheng)\
**Post date:** [May 19, 2021, 11:49am UTC](https://forum.opencv.org/t/how-to-contour-extraction-by-stroke/3276/7 "2021-05-19T11:49:52Z")

</div>

thank you, that is what i need!
