2D Histogram
One dimensional histogram only needs to consider gray value, but 2D histogram needs to consider hue and saturation.
2D histogram in OpenCV
The parameters of cv2.calcHist() method are different between one-dimensional histogram and 2D histogram,parameters should be modified as follows:
import cv2
import numpy as np
img = cv2.imread('pict