Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Histogram: Count black pixel per column

Hi guys,

I'm just getting started with OpenCV and I was wondering if it's possible, using calcHist, to create a histogram that counts all the black pixel per column in a binary image. By column I mean every single pixel column of the image, so that I would use image.width bins. Every bin should then have a value like 60, 80, 1000, whatever, depending of how many of the pixels in that column were black. Is there a way to use the OpenCV method or do I have to implement it myself?

Thanks a lot!
–f