Here is the example of image histogram horizontal projection from Article
for row in range(height):
cv2.line(blankImage, (0,row), (int(horizontal_projection[row]*width/height),row), (255,255,255), 1)
I have created vertical projection accordingly:
vertical_projection = np.sum(binarizedImage, axis=0);
And changed the for loop to project values on blank Image
for col in range(width):
cv2.line(blankImage, (col,0), (col, int(myprojection[col]*width/height)), (255,255,255), 1)
But the code does not produce expected result.
after removing the multiplier *width/height
for col in range(width):
cv2.line(blankImage, (col,0), (col, int(myprojection[col])), (255,255,255), 1)
Could you please advice how this for loop can be converted to draw vertical histogram projections on x-axis, bottom-up and scaled?



