Enhance.histogram input and output?

I can’t wrap my head around kornia.enhance.histogram.

I want to use it to compare histograms of two images in a differentiable way.
But I don’t really get what the funtion expects as input and what the output means. Also I don’t really understand the bandwidth and epsilon parameters.

With torch.histc I’m doing the following to get my desired result. An 1D Tensor of the histogram of R channel of the image.

histoA = torch.histc(input_A[0,0,:,:], bins=255, min=0, max=1)

Input_A is a RGB image in n,c,h,w format.