A Novel Retinex Based Enhancement Algorithm