Search code examples
iosfilteredge-detectiongpuimage

GPUImage CannyEdgeDetectionFilter with white edges?


I'm using GPUImage from the Git repository to apply some filters to images. I notice that the edge detection filters (I'm using the CannyEdgeDetectionFilter specifically) paint white edges on black background. Anyone know how to make that black edges on white background - or another filter that would do it (and not be heavyweight since that's the only filter I would need from that library).

Thanks Tony.


Solution

  • GPUImageColorInvertFilter is available with GPUImage and should do what you need.