GPUImage icon indicating copy to clipboard operation
GPUImage copied to clipboard

GPUImageSobelEdgeDetectionFilter intensity attribute

Open danielvmacedo opened this issue 14 years ago • 3 comments

Hi,

I'm trying to make a Neon effect (black image with colored edges) using the GPUImageSobelEdgeDetectionFilter. However, the intensity attribute is not showing up for me?

Is it the correct attribute?? Or should I do in a differente way?

Thanks

danielvmacedo avatar Apr 02 '12 15:04 danielvmacedo

The intensity property was removed a little while ago, but it wouldn't have done what you want here. All it did was fade between the original image and the edge detection. It slowed down the entire filter for something few people would use, so I yanked that property.

For a color effect, you'll want to subclass this filter to have a settable color uniform and use that instead of white. Look at the GPUImageSketchFilter, which subclasses the edge detection filter to produce black instead of white for the borders. Also, GPUImageChromaKeyBlendFilter shows how you can pass in a color to the shader to use in your processing. You'll want to take the edge detection filter's mag variable and multiply that times your input color to achieve this neon effect. It shouldn't be that hard to do, based on these examples.

BradLarson avatar Apr 02 '12 19:04 BradLarson

Thanks!! I got it working ;)

danielvmacedo avatar Apr 03 '12 14:04 danielvmacedo

Hi, I want the Neon effect, too. But I don't know OpenGL at all. So would you like to help me make this out? By the way, thank you for your effort. This project helps me to carry so many effects out.

fengally avatar May 14 '12 13:05 fengally