HOME/Articles/

pil example histogram equalization imports (snippet)

Article Outline

Python pil example 'histogram equalization imports'

Modules used in program:

  • import matplotlib.pyplot as plt
  • import numpy as np

python histogram equalization imports

Python pil example: histogram equalization imports

%matplotlib inline
from IPython.display import display, Math, Latex

import numpy as np
import matplotlib.pyplot as plt
from PIL import Image

img = Image.open('lung.jpg')

# display the image
plt.imshow(img, cmap='gray')