print(binarizedImage. shape)
height, width = binarizedImage.shape
print('width:  ', width)
print('height: ', height)

# Convert black spots to ones & white spots to zeros for binarized image
binarizedImage[binarizedImage == 0] = 1
binarizedImage[binarizedImage == 255] = 0


horizontal_projection = np.sum(binarizedImage, axis=1)
print(horizontal_projection)


# create blank image
blankImage = np.zeros((height, width, 3), np.uint8)

# draw line for each rows in image
for row in range(binarizedImage.shape[0]):
    cv2.line(blankImage, (0,row), (int(horizontal_projection[row]*width/height),row), (255,255,255), 1)

cv2.imshow('result', blankImage)
5fdeba8f305d9f8af02ee6c80e3adfbc0c871869
<mask token>

print(binarizedImage.shape)
<mask token>
print('width:  ', width)
print('height: ', height)
<mask token>
print(horizontal_projection)
<mask token>
for row in range(binarizedImage.shape[0]):
    cv2.line(blankImage, (0, row), (int(horizontal_projection[row] * width /
        height), row), (255, 255, 255), 1)
cv2.imshow('result', blankImage)

print(binarizedImage.shape)
height, width = binarizedImage.shape
print('width:  ', width)
print('height: ', height)
binarizedImage[binarizedImage == 0] = 1
binarizedImage[binarizedImage == 255] = 0
horizontal_projection = np.sum(binarizedImage, axis=1)
print(horizontal_projection)
blankImage = np.zeros((height, width, 3), np.uint8)
for row in range(binarizedImage.shape[0]):
    cv2.line(blankImage, (0, row), (int(horizontal_projection[row] * width /
        height), row), (255, 255, 255), 1)
cv2.imshow('result', blankImage)

print(binarizedImage. shape)
height, width = binarizedImage.shape
print('width:  ', width)
print('height: ', height)

# Convert black spots to ones & white spots to zeros for binarized image
binarizedImage[binarizedImage == 0] = 1
binarizedImage[binarizedImage == 255] = 0


horizontal_projection = np.sum(binarizedImage, axis=1)
print(horizontal_projection)


# create blank image
blankImage = np.zeros((height, width, 3), np.uint8)

# draw line for each rows in image
for row in range(binarizedImage.shape[0]):
    cv2.line(blankImage, (0,row), (int(horizontal_projection[row]*width/height),row), (255,255,255), 1)

cv2.imshow('result', blankImage)