Adaptive extended piecewise histogram equalisation for dark image enhancement