import cv2

img = cv2.imread("resources/girl.jpg")
# size of image(h,w,no ofchannels eg:BGR)
print(img.shape)
# to resize use resize function wiht perimeter (w,h)
imgNew = cv2.resize(img,(100,100))
cv2.imshow("output",img)
cv2.imshow("new",imgNew)
# croping a image
cropped_image = img[50:170, 150:250] # [height fm:to, width fm:to]
cv2.imshow("cropped", cropped_image)
cv2.waitKey(0)
04e58ae3a66d136e3ca264b5b421be199772f600
<mask token>

<mask token>
print(img.shape)
<mask token>
cv2.imshow('output', img)
cv2.imshow('new', imgNew)
<mask token>
cv2.imshow('cropped', cropped_image)
cv2.waitKey(0)

<mask token>
img = cv2.imread('resources/girl.jpg')
print(img.shape)
imgNew = cv2.resize(img, (100, 100))
cv2.imshow('output', img)
cv2.imshow('new', imgNew)
cropped_image = img[50:170, 150:250]
cv2.imshow('cropped', cropped_image)
cv2.waitKey(0)

import cv2
img = cv2.imread('resources/girl.jpg')
print(img.shape)
imgNew = cv2.resize(img, (100, 100))
cv2.imshow('output', img)
cv2.imshow('new', imgNew)
cropped_image = img[50:170, 150:250]
cv2.imshow('cropped', cropped_image)
cv2.waitKey(0)

import cv2

img = cv2.imread("resources/girl.jpg")
# size of image(h,w,no ofchannels eg:BGR)
print(img.shape)
# to resize use resize function wiht perimeter (w,h)
imgNew = cv2.resize(img,(100,100))
cv2.imshow("output",img)
cv2.imshow("new",imgNew)
# croping a image
cropped_image = img[50:170, 150:250] # [height fm:to, width fm:to]
cv2.imshow("cropped", cropped_image)
cv2.waitKey(0)