<jupyter_start><jupyter_text>open image<jupyter_code>img= cv2.imread('Image/0.jpg')
cv2.imshow('Image',img)
cv2.waitKey(0)<jupyter_output><empty_output><jupyter_text>shape of image<jupyter_code>img.shape<jupyter_output><empty_output><jupyter_text>height of image<jupyter_code>img.shape[0]<jupyter_output><empty_output><jupyter_text>width of image<jupyter_code>img.shape[1]<jupyter_output><empty_output><jupyter_text>dtype<jupyter_code>img.dtype<jupyter_output><empty_output><jupyter_text>ndim<jupyter_code>img.ndim<jupyter_output><empty_output><jupyter_text>size of image<jupyter_code>img.size<jupyter_output><empty_output><jupyter_text>rescale image<jupyter_code>img=cv2.imread('Image/1.png')
cv2.imshow("image",img)
def rescale(frame,scale=0.50):
    w=int(frame.shape[1]*scale)
    h=int(frame.shape[0]*scale)
    dim=(w,h)
    return cv2.resize(frame,dim)
resized_img=rescale(img)
cv2.imshow("resized_image",resized_img)
cv2.waitKey(0)
img=cv2.imread('Image/1.png')
cv2.imshow("image",img)

resized_img=cv2.resize(img,(500,500))
cv2.imshow("resized_image",resized_img)
cv2.waitKey(0)<jupyter_output><empty_output><jupyter_text>rescale video frame<jupyter_code>def rescale(frame,scale=0.80):
    h=int(frame.shape[0]*scale)
    w=int(frame.shape[1]*scale)
    dim=(w,h)
    return cv2.resize(frame,dim)

video=cv2.VideoCapture(0)
while True:
    isTrue,frame=video.read()
    resize_frame=rescale(frame)
    cv2.imshow("Video",frame)
    cv2.imshow("resize_video",resize_frame)
    if cv2.waitKey(0):
        break
video.release()
cv2.destroyAllWindows()
video=cv2.VideoCapture(0)
while True:
    isTrue,frame=video.read()
    resize_frame=cv2.resize(frame,(500,500))
    cv2.imshow("Video",frame)
    cv2.imshow("resize_video",resize_frame)
    if cv2.waitKey(0):
        break
video.release()
cv2.destroyAllWindows()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15613182063749326, 'fraction_numerical': 0.031874662344678555, 'mean_word_length': 8.306532663316583, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '9', 'dir': 'jupyter-structured-clean-dedup', 'id': '617451', 'license': 'MIT', 'n_tokens_mistral': 789, 'n_tokens_neox': 776, 'n_words': 62, 'path': 'opencv_/resize_and_rescale.ipynb', 'repo_name': 'AKSK16101999/Image_Processing', 'size': '1851'}