Development of multiscale retinex algorithm for medical image enhancement based on multi-rate sampling