Text this: Salt and Pepper Noise Removal with Noise Detection and a Patch-Based Sparse Representation