<jupyter_start><jupyter_text>SummaryIn this chapter, we looked at the key concepts related to images. Images constitute rich information that's necessary to build your computer vision projects. OpenCV uses the `BGR` color format instead of `RGB`, but some Python packages (for example, Matplotlib) use the latter format. Therefore, we have covered how to convert the image from one color format into the other. Additionally, we have summarized the main functions and options to work with images:**Additionally, we have summarized the main functions and options to work with images:*** To access image properties* Some OpenCV functions, such as:- >cv2.imread(), cv2.split(), cv2.merge(), cv2.imshow(), cv2.waitKey(), and cv2.destroyAllWindows()How to get and set image pixels in both BGR and grayscale images  Q1: What are the main image-processing steps?* Get the image to work with. This process usually involves some functions so that you can read the image from different sources (camera, video stream, disk, online resources).* Process the image by applying image-processing techniques to achieve the required functionality (for example, detecting a cat in an image).* Show the result of the processing step (for example, drawing a bounding box in the image and then saving it to disk).  Q2 What are the three processing levels?* Low-level* Mid-level* High-level  Q3 What is the difference between a grayscale image and a black and white image?* The grayscale image has just one channel wchich is not displayed when we run .shape on it* Gray-scale has just 2 dimensions, rows and columns* Flipping the channel of the GrayScale image basically flips the image vertically* Gray and Black and White are pretty much the same<jupyter_code>import cv2
import numpy as np
import matplotlib.pyplot as plt
gray = cv2.imread('logo.png', cv2.IMREAD_GRAYSCALE)
plt.imshow(gray)
plt.show()
# Convert to Binary

(thresh, im_bw) = cv2.threshold(gray, 128, 255, cv2.THRESH_BINARY | cv2.THRESH_OTSU)
plt.imshow(im_bw)
plt.show()
im_bw.shape == gray.shape
im_bw.ndim == gray.ndim<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.06829035339063992, 'fraction_numerical': 0.010506208213944603, 'mean_word_length': 5.179941002949852, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '488556', 'license': 'MIT', 'n_tokens_mistral': 578, 'n_tokens_neox': 556, 'n_words': 292, 'path': 'Ch.2/image_basics_in_OpenCV/.ipynb_checkpoints/05.summary_and_questions-checkpoint.ipynb', 'repo_name': 'Lawrence-Krukrubo/Mastering-OpenCV4-with-Python', 'size': '2094'}