l'm a little bit confused on width and height parameter :
Is the height which is the first parameter or the second ?
HEIGHT,WIDTH= img.shape[0:2]
or WIDTH,HEIGHt= img.shape[0:2]
and in resize function height=32 and width=100
or the inverse ?
image=cv2.resize(img, (32, 100), interpolation=cv2.INTER_NEAREST)
With .shape it's HEIGHT, WIDTH = img.shape[0:2]
. The reason for this, is it's a numpy matrix, where the first value means number of rows, and the second is number of columns.
When you resize it's img = cv2.resize(img, (WIDTH, HEIGHT))
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With