<jupyter_start><jupyter_text>Getting Started  Image Processing with Python Matplotlib and Numpy  Loading Modules<jupyter_code>import numpy as np
import matplotlib.pyplot as  plt
import matplotlib.image as mpimg<jupyter_output><empty_output><jupyter_text>Loading RGB Image<jupyter_code>img = mpimg.imread("data/home.jpg")
img_1 = mpimg.imread("data/butterfly.jpg")<jupyter_output><empty_output><jupyter_text>Some Image Properties<jupyter_code>img.ndim
print("Image Dimension: ",img.ndim)
print("Image Shape: ",img.shape)<jupyter_output>Image Dimension:  3
Image Shape:  (384, 512, 3)<jupyter_text>Min and Max Values for R, G and B Channels<jupyter_code>print("R Channel:")
print("---------")
print("Min = ",img[:,:,0].min())
print("Max = ",img[:,:,0].max())
print("G Channel:")
print("---------")
print("Min = ",img[..., 1].min())
print("Max = ",img[..., 1].max())
print("B Channel:")
print("---------")
print("Min = ",img[..., 2].min())
print("Max = ",img[..., 2].max())<jupyter_output>B Channel:
---------
Min =  0
Max =  255<jupyter_text>Plotting Image Basics<jupyter_code>plt.figure(1,figsize=(10,10))

plt.subplot(121)
plt.title("Home")
plt.xticks([]) # hides x-axis ticks
plt.yticks([]) # hides y-axis ticks
plt.imshow(img)

plt.subplot(122)
plt.title("Butterfly")
plt.xticks([]) # hides x-axis ticks
plt.yticks([]) # hides y-axis ticks
plt.imshow(img_1)

plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.2105638829407566, 'fraction_numerical': 0.02212705210563883, 'mean_word_length': 5.644549763033176, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '591211', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 582, 'n_tokens_neox': 532, 'n_words': 105, 'path': 'notebooks/1-getting-started.ipynb', 'repo_name': 'trabdlkarim/UNIKA_MSc_CME714_DIP', 'size': '1401'}