# Create a contour manually

**URL:** <https://forum.opencv.org/t/create-a-contour-manually/6590>\
**Category:** C++\
**Tags:** imgproc\
**Created:** [December 6, 2021, 5:15pm UTC](https://forum.opencv.org/t/create-a-contour-manually/6590 "2021-12-06T17:15:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christophe\_Jacquelin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/christophe_jacquelin/32/135_2.png) [@Christophe\_Jacquelin](https://forum.opencv.org/u/Christophe_Jacquelin)\
**Post date:** [December 6, 2021, 5:15pm UTC](https://forum.opencv.org/t/create-a-contour-manually/6590/1 "2021-12-06T17:15:19Z")

</div>

Hello,  
How to create a contour, by sending manually the x,y points of the contours (in my own function) instead to use findcontours?  
Thank you,

---

<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:** [December 6, 2021, 5:25pm UTC](https://forum.opencv.org/t/create-a-contour-manually/6590/2 "2021-12-06T17:25:01Z")

</div>

a contour can be a `std::vector<cv::Point>`, or a Mat of suitable shape.

a list of contours is a vector of those.

browse the examples. here’s one: [OpenCV: samples/cpp/contours2.cpp](https://docs.opencv.org/3.4/da/d32/samples_2cpp_2contours2_8cpp-example.html#a3)

don’t expect there to be an example that precisely does what you need.
