Fixed Adapt Histogram Equalisation

Actually doing adaptive histogram equlisation this time.