Just FYI, Core Image is normally dealt with n the Quartz list rather than here, but not to worry.

On 22 May 2008, at 22:36, Jordan Woehr wrote:
Does this mean that it is not possible to write a bilateral filter
which does the computations on the GPU?

Filters of variable kernel size are tricky (to say the least).

Apple's blur filter seems to generate different GPU programs depending on the radius parameter, but it does run on the GPU. It might also be multi-pass. You can see that varying the radius of the blur is quite low performance compared to changing the image it's blurring.

If your filter has a fixed kernel size (that isn't too big), then it can normally be coded. The key problem is the the kernel language has no conditional branching, so loops of variable length aren't allowed. Fixed length

You may have more luck coding for OpenGL rather than CoreImage, and using GLSL. Unfortunately Apple decided to remove the parts of GLSL that the hardware of the time didn't support when they created the CIKernel language. Now that hardware is more capable CI is stuck with those limitations.

That said, getting a OpenGL solution running will probably need you to be familiar with Pixel Buffer Objects (PBOs), Frame Buffer Objects (FBOs) and devising some way of putting your 4D data into textures (which you'd have to do for CoreImage anyway).

Another advantage of going the OpenGL route is that you've be able to use 3D textures, rather than just 2D images that you'll be working with in CoreImage. At least that's only one dimension off.

Is there source code available for
this filter and if so where is it? I have had no luck finding it so
far.

You won't find it, it's in a framework that isn't open-source.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to