<jupyter_start><jupyter_text>Let's take a closer look at how images are stored<jupyter_code># Import numpy
import numpy as np
print(input.shape)<jupyter_output>(519, 778, 3)<jupyter_text>Shape gives the dimensions of the image array The 2D dimensions are 830 pixels in high bv 1245 pixels wide. The '3L' means that there are 3 other components (RGB) that make up this image.<jupyter_code># Let's print each dimension of the image

print('Height of Image:', int(input.shape[0]), 'pixels')
print('Width of Image: ', int(input.shape[1]), 'pixels')<jupyter_output>Height of Image: 519 pixels
Width of Image:  778 pixels<jupyter_text>How do we save images we edit in OpenCV?<jupyter_code># Simply use 'imwrite' specificing the file name and the image to be saved
cv2.imwrite('output.jpg', input)
cv2.imwrite('output.png', input)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10199296600234467, 'fraction_numerical': 0.031652989449003514, 'mean_word_length': 6.362068965517241, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '30511', 'license': 'MIT', 'n_tokens_mistral': 300, 'n_tokens_neox': 277, 'n_words': 104, 'path': 'OpenCV.ipynb', 'repo_name': 'manas149/OpenCV', 'size': '853'}