Modular procedures for content aware image enhancement