• 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: CIImage slower than NSImage?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CIImage slower than NSImage?


  • Subject: Re: CIImage slower than NSImage?
  • From: Scott Thompson <email@hidden>
  • Date: Tue, 29 Nov 2005 09:22:15 -0600


On Nov 22, 2005, at 09:00, Kenny Leung wrote:


Hi All.

I am using CoreImage in my application, and I'm finding that geometric operations, particularly rotation, are much slower with CIImage than NSImage. In fact, rotating an NSImage causes no noticeable slowdown while rotating a CIImage causes a very noticeable slowdown.

Also, applying a transform to a CIImage as a filter yields different results than when the transform is applied to the current graphics context.

Can someone shed some light on this?

Thanks!

-Kenny

When you simply rotate the context, the system just uses the same representation of the image and performs sampling to create the rotated image. Core Image goes through many more steps.


On Nov 22, 2005, at 11:54 AM, Kenny Leung wrote:

Also, the 128-bit floating point version of an image performs better than the 32-bit integer version!

-Kenny

That doesn't surprise me much.

Core image processes it's image in a floating point space. Conceptually, it takes the source pixels, color converts them to a device independent RGB space that uses floating point pixels, performs it's processing, and then "renders the results down" to the destination.

Your performance observation is likely caused the need to convert 32 bit integers to a floating point representation. In other words, the floating point version of the image requires less "mangling" than the 32 bit integer version.

Core image is remarkably fast at providing complex pixel processing. For simpler things, however, the careful steps it goes through to maintain the fidelity of the pixels it manages add too much overhead. If you want to do something simple, like rotate an image, consider using the framework images (CGImage and NSImage) or vImage in the accelerate framework.

Scott


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: CIImage slower than NSImage?
      • From: Kenny Leung <email@hidden>
References: 
 >CIImage slower than NSImage? (From: Kenny Leung <email@hidden>)
 >Re: CIImage slower than NSImage? (From: Milton Sagen <email@hidden>)
 >Re: CIImage slower than NSImage? (From: Kenny Leung <email@hidden>)

  • Prev by Date: NSArrayController replace and observeValueForKeyPath:
  • Next by Date: Re: timers and event loops
  • Previous by thread: Re: CIImage slower than NSImage?
  • Next by thread: Re: CIImage slower than NSImage?
  • Index(es):
    • Date
    • Thread