Grayscale Image Contrast Calculator

Core Vision Operations DS practice problem on Onlearn.

Difficulty: easy.

Topics: Understanding Grayscale Image Contrast Calculator, Min-Max Normalization, Grayscale Bit Depth, Dynamic Range, NumPy Vectorization, Global Contrast Metric, Computer Vision, Image Processing, Data Structures, Numerical Analysis, Software Engineering, Pixel Intensity Analysis, Array Manipulation, Statistical Summarization, Color Space Transformation, Computational Complexity.

Write a Python function to calculate the contrast of a grayscale image using the difference between the maximum and minimum pixel values.