March 2019
Intermediate to advanced
532 pages
13h 2m
English
A common approach is to load an image, perform some kind of processing, and finally output this processed image (see Chapter 2, Image Basics in OpenCV, for a deeper explanation of these three steps). In this sense, the processed image can be saved to disk. In the following example, these three steps (load, processing, and save) are introduced. In this case, the processing step is very simple (convert the image into grayscale). This can be seen in the following example, argparse_load_processing_save_image.py:
# Import the required packagesimport argparseimport cv2# We first create the ArgumentParser object # The created object 'parser' will have the necessary information# to parse the command-line arguments ...