title: ios Image text and colour enhancement filter
body: <p>I am trying CIFilter and GPUImage filter to apply various effects (brightness, contrast, saturation, etc.) on an image, but I'm struggling, would need an enhancement like the one shown below:</p>
  
  <p><strong>Before Enhancement filter</strong></p>
  
  <p><a href="https://i.stack.imgur.com/sYpC5.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sYpC5.jpg" alt="Before Enhancement filter: "></a></p>
  
  <p><strong>After Enhancement filter</strong></p>
  
  <p><a href="https://i.stack.imgur.com/bugqy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bugqy.png" alt="After Enhancement filter"></a></p>
  
  <p>CIFilter code that I tried:</p>
  
  <pre><code>NSDictionary *options = @{ CIDetectorImageOrientation :
                                 [[resultImage properties] valueForKey:kCGImagePropertyOrientation] };
  NSArray *adjustments = [resultImage autoAdjustmentFiltersWithOptions:options];
  for (CIFilter *filter in adjustments) {
      [filter setValue:resultImage forKey:kCIInputImageKey];
      resultImage = filter.outputImage;
  }
  </code></pre>
  
  <p>GPUImage Filter:</p>
  
  <pre><code>UIImage *inputImage = [UIImage imageNamed:@"Msource.png"];
  GPUImageAdaptiveThresholdFilter *stillImageFilter = [[GPUImageAdaptiveThresholdFilter alloc] init];
  stillImageFilter.blurRadiusInPixels = 10.0;// adjust this to tweak the blur radius of the filter, defaults to 4.0
  
  UIImage *filteredImage = [stillImageFilter imageByFilteringImage:inputImage];
  </code></pre>