Pattern recognition based on entropy analysis and shape transformations