• 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
most efficient way to string CIFilters together?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

most efficient way to string CIFilters together?


  • Subject: most efficient way to string CIFilters together?
  • From: Josh Burnett <email@hidden>
  • Date: Sat, 3 May 2008 14:06:01 -0400

In a photography app, I'm chaining a series of CIFilters together to process the image. I'm able to do the chain just fine, but I'm only using a few filters at the moment. As I increase the length of this chain, am I going to run into performance issues? Here's my code:

exposureFilter   = [CIFilter filterWithName: @"CIExposureAdjust"
	keysAndValues:
		@"inputImage", inputImage,
		@"inputEV", [NSNumber numberWithFloat: exposureValue],
		nil];
outputImage = [exposureFilter valueForKey: @"outputImage"];
[exposureFilter retain];

zoomFilter   = [CIFilter filterWithName: @"CILanczosScaleTransform"
	keysAndValues:
		@"inputImage", outputImage,
		@"inputScale", [NSNumber numberWithFloat: mappedZoom],
		@"inputAspectRatio", [NSNumber numberWithFloat: 1.0],
		nil];
outputImage = [zoomFilter valueForKey: @"outputImage"];
[zoomFilter retain];


Obviously, it's easy to continue to add to this chain. Is this the most efficient way to string multiple filters together? I can probably use Quartz Composer to create a single image unit that does all of the processing. Would that be any more efficient, or would it be essentially the same result?


Thanks,

Josh
_______________________________________________

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: most efficient way to string CIFilters together?
      • From: Jean-Daniel Dupas <email@hidden>
  • Prev by Date: Re: Converting XML to NSDictionary
  • Next by Date: Re: Loading a .nib?
  • Previous by thread: Re: Real time video analysis app under Cocoa
  • Next by thread: Re: most efficient way to string CIFilters together?
  • Index(es):
    • Date
    • Thread