• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Custom Core Image filter help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom Core Image filter help


  • Subject: Re: Custom Core Image filter help
  • From: Nicko van Someren <email@hidden>
  • Date: Wed, 20 Feb 2008 10:12:56 +0000

On 18 Feb 2008, at 12:42, Daniel Thorpe wrote:

Hello everyone, I'm a complete newbie when it comes to Core Image, so I'm hoping some experienced people might be able to help...

We can but try :-)

I'm trying to compute discrete orthogonal image moments, using Tchebichef polynomials,
...
T(m,n) = SUM_x { SUM_y { t(m, x) * t(n,y) * f(x,y) }}

...
I'm not sure if this can be done in Core Image because the kernel will need to loop over the entire input image domain... and to use the for control statement, "the loop condition must be inferred at the time the code compiles" - which leads me to think that such a kernel will not work for different sized images?

The big pain here is that Apple don't support the OpenGL matrixCompMult function in their dialect of the shading language. That said, observe that CIKernel objects get initialised with a string, which you can construct on the fly, so needing to set the size at 'compile' time only means at the time that the kernel object is created.


Apple do support the 'dot'. I would therefore suggest that you re- write your equation like this:

T(m,n) = SUM_y { t(n,y) * (SUM_x {  t(m, x) * f(x,y) } ) }

You can then construct an 'image' representing the t function, with the pixel at x,y representing t(y,x). This allows you to compute the inner sum by selecting row m from the image and taking its dot-product with each row of the input image. You can then use a for loop to sum up those sums scaled by the values taken from row n.

I hope this helps.

	Nicko

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Custom Core Image filter help
      • From: Daniel Thorpe <email@hidden>
References: 
 >Custom Core Image filter help (From: Daniel Thorpe <email@hidden>)

  • Prev by Date: Auto Completing Text Field
  • Next by Date: synchronize the content of two arrays with binding
  • Previous by thread: Custom Core Image filter help
  • Next by thread: Re: Custom Core Image filter help
  • Index(es):
    • Date
    • Thread