# Hand Drawing Shape OpenCV/Canvas

**URL:** https://forum.kirupa.com/t/hand-drawing-shape-opencv-canvas/638071
**Category:** web dev
**Created:** [April 13, 2018, 8:33am UTC](https://forum.kirupa.com/t/hand-drawing-shape-opencv-canvas/638071 "2018-04-13T08:33:06Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dungsmile4242](https://avatars.discourse-cdn.com/v4/letter/d/77aa72/32.png) [@dungsmile4242](https://forum.kirupa.com/u/dungsmile4242)
#### Post date: [April 13, 2018, 8:33am UTC](https://forum.kirupa.com/t/hand-drawing-shape-opencv-canvas/638071/1 "2018-04-13T08:33:06Z")

</div>

Hello guys!

I am a student and all the help I can have are really appreciated! \<3  
My first target is to create a canvas, wherein I can draw shape manually. (Pentagon, hexagon, square, arrow, etc) I don’t want to draw the shape as solid one but I want to do it manually. Easy right? I can just use the canvas with that. But my problem lies here, After or during (I am not sure yet if which is better) drawing, (for example I am going to draw pentagon, ang my drawing is a bit squimsy, or to pointy something like that), I want to make the drawing smooth making it like I’ve drawn a solid shape. (meaning correcting the hand drawn shape/detecting what shape is that and recreating a good shape unlike the squimsy drawing) How can I do that?  
What I’ve conclude is this: (but this is after drawing all the shape, but i’m not sure how to detect if the drawing is finished yet)

```
get the shape (know what kind of shape is that, i know OpenCV can do that)
get the height/radius/width (all requirements to be considered in the shape)
then redraw the shape (getting the max height as the basis of the size if the shape)

```

Is this good? But I am not sure on how to use OpenCV on web. As well as I want to re-shape the drawing during the drawing. Not after. And when I do this the web needs to be refreshed everytime right?  
Do you have any points/idea/suggestion on how could I do this?

Thank you and I hope you could help me with this. Lovelots!
