# I want draw a histogram for a grayscale picture

**URL:** <https://forum.opencv.org/t/i-want-draw-a-histogram-for-a-grayscale-picture/7978>\
**Category:** C++\
**Tags:** imgproc\
**Created:** [March 17, 2022, 7:14am UTC](https://forum.opencv.org/t/i-want-draw-a-histogram-for-a-grayscale-picture/7978 "2022-03-17T07:14:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![washere](https://avatars.discourse-cdn.com/v4/letter/w/e19b73/32.png) [@washere](https://forum.opencv.org/u/washere)\
**Post date:** [March 17, 2022, 7:14am UTC](https://forum.opencv.org/t/i-want-draw-a-histogram-for-a-grayscale-picture/7978/1 "2022-03-17T07:14:15Z")

</div>

Hello everyone, I hope you are all doing well ,  
I am currently working on class work and I need to make a histogram for my gray image. I have managed to write the calcHist() function but I failed to draw the histogram.  
Can someone explain and provide a link where I can get help to draw and display the histogram .

---

<div class="post-metadata">

**Author:** ![sturkmen](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/sturkmen/32/13_2.png) [@sturkmen](https://forum.opencv.org/u/sturkmen)\
**Post date:** [March 17, 2022, 7:33am UTC](https://forum.opencv.org/t/i-want-draw-a-histogram-for-a-grayscale-picture/7978/2 "2022-03-17T07:33:52Z")

</div>

See [OpenCV: Histogram Calculation](https://docs.opencv.org/4.x/d8/dbc/tutorial_histogram_calculation.html)
