1
0

Correctly putting the borders in place

This commit is contained in:
Jip J. Dekker 2018-05-25 16:15:44 +10:00
parent ea18a4ca3e
commit 1208bb3246

View File

@ -56,15 +56,17 @@ if __name__ == '__main__':
image = cv2.imread("10.jpg")
# Split image
cuts = image_cut(image, 64, 64)
for i in len(cuts):
for i in range(len(cuts)):
# Transform block
hsv = color.rgb2hsv(cuts[i])
hsv[:, :, 2] = exposure.equalize_hist(hsv[:, :, 2])
block = color.hsv2rgb(hsv)
block = np.rollaxis(block, -1)
if is_Wally("Waldo.h5", block):
# if True:
# Border block
cuts[i] = cv2.copyMakeBorder(cuts[i],5,5,5,5,cv2.BORDER_CONSTANT,value=RED)
GREEN = [0, 255, 0]
cuts[i] = cv2.copyMakeBorder(cuts[i][1:61,1:61],2,2,2,2,cv2.BORDER_CONSTANT,value=GREEN)
# Stitch image TODO!
# Show image