import argparse
import cv2

ap = argparse.ArgumentParser()
ap.add_argument("-i", "--image", type=str, default="cat.jpg",
                help="path to input image")
args = vars(ap.parse_args())

image = cv2.imread(args["image"])
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)

equalized = cv2.equalizeHist(gray)

cv2.imshow("Gray", gray)
cv2.imshow("Equalized", equalized)
cv2.waitKey(0)
0e72c1c1e82c187642e1d24336f74a9456c51f33
<mask token>

<mask token>
ap.add_argument('-i', '--image', type=str, default='cat.jpg', help=
    'path to input image')
<mask token>
cv2.imshow('Gray', gray)
cv2.imshow('Equalized', equalized)
cv2.waitKey(0)

<mask token>
ap = argparse.ArgumentParser()
ap.add_argument('-i', '--image', type=str, default='cat.jpg', help=
    'path to input image')
args = vars(ap.parse_args())
image = cv2.imread(args['image'])
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
equalized = cv2.equalizeHist(gray)
cv2.imshow('Gray', gray)
cv2.imshow('Equalized', equalized)
cv2.waitKey(0)

import argparse
import cv2
ap = argparse.ArgumentParser()
ap.add_argument('-i', '--image', type=str, default='cat.jpg', help=
    'path to input image')
args = vars(ap.parse_args())
image = cv2.imread(args['image'])
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
equalized = cv2.equalizeHist(gray)
cv2.imshow('Gray', gray)
cv2.imshow('Equalized', equalized)
cv2.waitKey(0)

import argparse
import cv2

ap = argparse.ArgumentParser()
ap.add_argument("-i", "--image", type=str, default="cat.jpg",
                help="path to input image")
args = vars(ap.parse_args())

image = cv2.imread(args["image"])
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)

equalized = cv2.equalizeHist(gray)

cv2.imshow("Gray", gray)
cv2.imshow("Equalized", equalized)
cv2.waitKey(0)